Built motion from commit 3000230.|0.0.51
[motion.git] / server / api / jscripty_project / jscripty_project.controller.js
index 8cb0afa..669c799 100644 (file)
@@ -1 +1 @@
-var _0x7d6e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x78\x6D\x6C\x32\x6A\x73","\x6C\x6F\x64\x61\x73\x68","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x6E\x61\x6D\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x70\x65\x72\x5F\x70\x61\x67\x65","\x71\x75\x65\x72\x79","\x70\x61\x67\x65","\x6F\x72\x64\x65\x72","\x25\x73\x20\x25\x73","\x73\x6F\x72\x74\x5F\x62\x79","\x73\x6F\x72\x74\x5F\x6F\x72\x64\x65\x72","\x41\x53\x43","\x66\x6F\x72\x6D\x61\x74","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x25","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x24","\x24\x6C\x69\x6B\x65","\x66\x6F\x72\x49\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x62\x6C\x65\x77\x20\x75\x70\x21","\x63\x61\x74\x63\x68","\x63\x6F\x75\x6E\x74","\x63\x65\x69\x6C","\x6F\x66\x66\x73\x65\x74","\x25\x73\x3A\x2F\x2F\x25\x73\x25\x73\x3F\x70\x61\x67\x65\x3D\x25\x64","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x6F\x73\x74","\x68\x65\x61\x64\x65\x72\x73","\x62\x61\x73\x65\x55\x72\x6C","\x72\x6F\x77\x73","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x70\x72\x6F\x6A\x65\x63\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6C\x6F\x67","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3B\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D\x22","\x2E\x78\x6D\x6C\x22","\x74\x78\x74\x2F\x78\x6D\x6C","\x73\x65\x74","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x70\x72\x6F\x6A\x65\x63\x74\x4A\x73\x6F\x6E","\x70\x61\x72\x73\x65\x53\x74\x72\x69\x6E\x67"];_0x7d6e[0];var xml=require(_0x7d6e[1]);var _=require(_0x7d6e[2]);var JscriptyProject=require(_0x7d6e[4])[_0x7d6e[3]];function handleError(_0x7914x5,_0x7914x6){_0x7914x6=_0x7914x6||500;return function(_0x7914x7){_0x7914x5[_0x7d6e[6]](_0x7914x6)[_0x7d6e[5]](_0x7914x7)}}function responseWithResult(_0x7914x5,_0x7914x6){_0x7914x6=_0x7914x6||200;return function(_0x7914x9){if(_0x7914x9){_0x7914x5[_0x7d6e[6]](_0x7914x6)[_0x7d6e[7]](_0x7914x9)}}}function handleEntityNotFound(_0x7914x5){return function(_0x7914x9){if(!_0x7914x9){_0x7914x5[_0x7d6e[6]](404)[_0x7d6e[8]]();return null};return _0x7914x9}}function saveUpdates(_0x7914xc){return function(_0x7914x9){return _0x7914x9[_0x7d6e[10]](_0x7914xc)[_0x7d6e[9]](function(_0x7914xd){return _0x7914xd})}}function removeEntity(_0x7914x5){return function(_0x7914x9){if(_0x7914x9){return _0x7914x9[_0x7d6e[11]]()[_0x7d6e[9]](function(){_0x7914x5[_0x7d6e[6]](204)[_0x7d6e[8]]()})}}}exports[_0x7d6e[12]]=function(_0x7914xf,_0x7914x5){var _0x7914x10=[_0x7d6e[13],_0x7d6e[14]];var _0x7914x11=_0x7914xf[_0x7d6e[16]][_0x7d6e[15]]?parseInt(_0x7914xf[_0x7d6e[16]][_0x7d6e[15]],10):100;var _0x7914x12=_0x7914xf[_0x7d6e[16]][_0x7d6e[17]]?parseInt(_0x7914xf[_0x7d6e[16]][_0x7d6e[17]],10):0;var _0x7914x13={where:{},limit:_0x7914x11,offset:_0x7914x12*_0x7914x11};_[_0x7d6e[31]](_0x7914xf[_0x7d6e[16]],function(_0x7914x14,_0x7914x15){switch(_0x7914x15){case _0x7d6e[15]:;case _0x7d6e[17]:break;case _0x7d6e[20]:_0x7914x13[_0x7d6e[18]]=util[_0x7d6e[23]](_0x7d6e[19],_0x7914xf[_0x7d6e[16]][_0x7d6e[20]],_0x7914xf[_0x7d6e[16]][_0x7d6e[21]]||_0x7d6e[22])||null;break;case _0x7d6e[21]:break;case _0x7d6e[29]:_0x7914x13[_0x7d6e[25]][_0x7d6e[24]]=[];_0x7914x10[_0x7d6e[28]](function(_0x7914x16){var _0x7914x17={};_0x7914x17[_0x7914x16]={$like:_0x7d6e[26]+_0x7914x14+_0x7d6e[26]};_0x7914x13[_0x7d6e[25]][_0x7d6e[24]][_0x7d6e[27]](_0x7914x17)});break;default:_0x7914x13[_0x7d6e[25]][_0x7914x15]={$like:{}};_0x7914x13[_0x7d6e[25]][_0x7914x15][_0x7d6e[30]]=_0x7d6e[26]+_0x7914x14+_0x7d6e[26]}});JscriptyProject[_0x7d6e[43]](_0x7914x13)[_0x7d6e[9]](function(_0x7914x18){var _0x7914x19=Math[_0x7d6e[35]](_0x7914x18[_0x7d6e[34]]/_0x7914x11);var _0x7914x1a=_0x7914x19>(_0x7914x13[_0x7d6e[36]]+1)?util[_0x7d6e[23]](_0x7d6e[37],_0x7914xf[_0x7d6e[38]],_0x7914xf[_0x7d6e[40]][_0x7d6e[39]],_0x7914xf[_0x7d6e[41]],_0x7914x12+1):null;var _0x7914x1b=_0x7914x12>0?util[_0x7d6e[23]](_0x7d6e[37],_0x7914xf[_0x7d6e[38]],_0x7914xf[_0x7d6e[40]][_0x7d6e[39]],_0x7914xf[_0x7d6e[41]],_0x7914x12-1):null;_0x7914x5[_0x7d6e[6]](200)[_0x7d6e[5]]({count:_0x7914x18[_0x7d6e[34]],rows:_0x7914x18[_0x7d6e[42]],next_page:_0x7914x1a,previous_page:_0x7914x1b,total_pages:_0x7914x19})})[_0x7d6e[33]](function(_0x7914x7){_0x7914x5[_0x7d6e[6]](500)[_0x7d6e[5]]({error:_0x7d6e[32]})})};exports[_0x7d6e[44]]=function(_0x7914xf,_0x7914x5){console[_0x7d6e[46]](_0x7914xf[_0x7d6e[45]]);JscriptyProject[_0x7d6e[48]]({where:{name:_0x7914xf[_0x7d6e[45]][_0x7d6e[13]]}})[_0x7d6e[9]](function(_0x7914x1c){if(!_0x7914x1c){return _0x7914x5[_0x7d6e[47]](404)};return _0x7914x5[_0x7d6e[5]](_0x7914x1c)})[_0x7d6e[33]](function(_0x7914x7){return handleError(_0x7914x5,_0x7914x7)})};exports[_0x7d6e[49]]=function(_0x7914xf,_0x7914x5){JscriptyProject[_0x7d6e[52]](_0x7914xf[_0x7d6e[51]][_0x7d6e[50]])[_0x7d6e[9]](function(_0x7914x1d){if(!_0x7914x1d){return _0x7914x5[_0x7d6e[47]](404)};return _0x7914x5[_0x7d6e[5]](_0x7914x1d)})[_0x7d6e[33]](function(_0x7914x7){return handleError(_0x7914x5,_0x7914x7)})};exports[_0x7d6e[53]]=function(_0x7914xf,_0x7914x5){JscriptyProject[_0x7d6e[53]](_0x7914xf[_0x7d6e[45]])[_0x7d6e[9]](function(_0x7914x1d){return _0x7914x5[_0x7d6e[6]](201)[_0x7d6e[5]](_0x7914x1d)})[_0x7d6e[33]](function(_0x7914x7){return handleError(_0x7914x5,_0x7914x7)})};exports[_0x7d6e[54]]=function(_0x7914xf,_0x7914x5){if(_0x7914xf[_0x7d6e[45]][_0x7d6e[50]]){delete _0x7914xf[_0x7d6e[45]][_0x7d6e[50]]};JscriptyProject[_0x7d6e[52]](_0x7914xf[_0x7d6e[51]][_0x7d6e[50]])[_0x7d6e[9]](function(_0x7914x1d){if(!_0x7914x1d){return _0x7914x5[_0x7d6e[47]](404)};var _0x7914xd=_[_0x7d6e[55]](_0x7914x1d,_0x7914xf[_0x7d6e[45]]);_0x7914xd[_0x7d6e[56]]()[_0x7d6e[9]](function(){return _0x7914x5[_0x7d6e[6]](200)[_0x7d6e[5]](_0x7914x1d)})[_0x7d6e[33]](function(_0x7914x7){return handleError(_0x7914x5,_0x7914x7)})})[_0x7d6e[33]](function(_0x7914x7){return handleError(_0x7914x5,_0x7914x7)})};exports[_0x7d6e[11]]=function(_0x7914xf,_0x7914x5){JscriptyProject[_0x7d6e[57]]({where:{id:_0x7914xf[_0x7d6e[51]][_0x7d6e[50]]}})[_0x7d6e[9]](function(_0x7914x1d){if(!_0x7914x1d){return _0x7914x5[_0x7d6e[47]](404)};_0x7914x1d[_0x7d6e[11]]()[_0x7d6e[9]](function(){return _0x7914x5[_0x7d6e[47]](204)})[_0x7d6e[33]](function(_0x7914x7){return handleError(_0x7914x5,_0x7914x7)})})[_0x7d6e[33]](function(_0x7914x7){return handleError(_0x7914x5,_0x7914x7)})};exports[_0x7d6e[58]]=function(_0x7914xf,_0x7914x5){JscriptyProject[_0x7d6e[11]]({where:{id:_0x7914xf[_0x7d6e[16]][_0x7d6e[50]]},individualHooks:true})[_0x7d6e[9]](function(){return _0x7914x5[_0x7d6e[47]](204)})[_0x7d6e[33]](function(_0x7914x7){return handleError(_0x7914x5,_0x7914x7)})};exports[_0x7d6e[59]]=function(_0x7914xf,_0x7914x5,_0x7914x1e){JscriptyProject[_0x7d6e[52]](_0x7914xf[_0x7d6e[51]][_0x7d6e[50]])[_0x7d6e[9]](function(_0x7914x1d){if(!_0x7914x1d){return _0x7914x5[_0x7d6e[47]](404)};console[_0x7d6e[46]](_0x7914xf[_0x7d6e[16]][_0x7d6e[60]]);_0x7914x5[_0x7d6e[64]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E":_0x7d6e[61]+_0x7914xf[_0x7d6e[16]][_0x7d6e[60]]+_0x7d6e[62],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x7d6e[63]});return _0x7914x5[_0x7d6e[5]](_0x7914x1d[_0x7d6e[65]])})[_0x7d6e[33]](function(_0x7914x7){return handleError(_0x7914x5,_0x7914x7)})};exports[_0x7d6e[66]]=function(_0x7914xf,_0x7914x5,_0x7914x1e){JscriptyProject[_0x7d6e[52]](_0x7914xf[_0x7d6e[51]][_0x7d6e[50]])[_0x7d6e[9]](function(_0x7914x1d){if(!_0x7914x1d){return _0x7914x5[_0x7d6e[47]](404)};xml[_0x7d6e[67]](_0x7914x1d[_0x7d6e[65]],{normalizeTags:true,explicitArray:false},function(_0x7914x7,_0x7914x18){console[_0x7d6e[46]](_0x7914x18);return _0x7914x5[_0x7d6e[6]](200)[_0x7d6e[5]](_0x7914x18)})})[_0x7d6e[33]](function(_0x7914x7){return handleError(_0x7914x5,_0x7914x7)})}
\ No newline at end of file
+var _0xe831=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x78\x6D\x6C\x32\x6A\x73","\x6C\x6F\x64\x61\x73\x68","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x6E\x61\x6D\x65","\x66\x69\x65\x6C\x64\x73","\x6D\x65\x73\x73\x61\x67\x65","\x50\x72\x6F\x6A\x65\x63\x74\x20\x6E\x61\x6D\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x50\x52\x4F\x4A\x45\x43\x54","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x6C\x6F\x67","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3B\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D\x22","\x2E\x78\x6D\x6C\x22","\x74\x78\x74\x2F\x78\x6D\x6C","\x73\x65\x74","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x70\x72\x6F\x6A\x65\x63\x74\x4A\x73\x6F\x6E","\x70\x61\x72\x73\x65\x53\x74\x72\x69\x6E\x67"];_0xe831[0];var xml=require(_0xe831[1]);var _=require(_0xe831[2]);var JscriptyProject=require(_0xe831[4])[_0xe831[3]];var Util=require(_0xe831[5]);var sequelize=require(_0xe831[4])[_0xe831[6]];function handleError(_0x3579x7,_0x3579x8){return _0x3579x7[_0xe831[8]](500)[_0xe831[7]](_0x3579x8)}function responseWithResult(_0x3579x7,_0x3579xa){_0x3579xa=_0x3579xa||200;return function(_0x3579xb){if(_0x3579xb){_0x3579x7[_0xe831[8]](_0x3579xa)[_0xe831[9]](_0x3579xb)}}}function handleEntityNotFound(_0x3579x7){return function(_0x3579xb){if(!_0x3579xb){_0x3579x7[_0xe831[8]](404)[_0xe831[10]]();return null};return _0x3579xb}}function saveUpdates(_0x3579xe){return function(_0x3579xb){return _0x3579xb[_0xe831[12]](_0x3579xe)[_0xe831[11]](function(_0x3579xf){return _0x3579xf})}}function removeEntity(_0x3579x7){return function(_0x3579xb){if(_0x3579xb){return _0x3579xb[_0xe831[13]]()[_0xe831[11]](function(){_0x3579x7[_0xe831[8]](204)[_0xe831[10]]()})}}}exports[_0xe831[14]]=function(_0x3579x11,_0x3579x7,_0x3579x12){return JscriptyProject[_0xe831[18]](Util[_0xe831[17]](_0x3579x11[_0xe831[16]]))[_0xe831[11]](function(_0x3579x13){_0x3579x7[_0xe831[8]](200)[_0xe831[7]](_0x3579x13)})[_0xe831[15]](function(_0x3579x8){return handleError(_0x3579x7,_0x3579x8)})};exports[_0xe831[19]]=function(_0x3579x11,_0x3579x7){return JscriptyProject[_0xe831[23]](_0x3579x11[_0xe831[22]][_0xe831[21]])[_0xe831[11]](function(_0x3579x14){if(!_0x3579x14){return _0x3579x7[_0xe831[20]](404)};return _0x3579x7[_0xe831[7]](_0x3579x14)})[_0xe831[15]](function(_0x3579x8){return handleError(_0x3579x7,_0x3579x8)})};exports[_0xe831[24]]=function(_0x3579x11,_0x3579x7){return JscriptyProject[_0xe831[24]](_0x3579x11[_0xe831[31]])[_0xe831[11]](function(_0x3579x14){return _0x3579x7[_0xe831[8]](201)[_0xe831[7]](_0x3579x14)})[_0xe831[15]](sequelize.UniqueConstraintError,function(_0x3579x8){if(_0x3579x8[_0xe831[26]][_0xe831[25]]){_0x3579x8[_0xe831[27]]=_0xe831[28];_0x3579x8[_0xe831[29]]=_0xe831[30]};return handleError(_0x3579x7,_0x3579x8)})[_0xe831[15]](function(_0x3579x8){return handleError(_0x3579x7,_0x3579x8)})};exports[_0xe831[32]]=function(_0x3579x11,_0x3579x7){if(_0x3579x11[_0xe831[31]][_0xe831[21]]){delete _0x3579x11[_0xe831[31]][_0xe831[21]]};JscriptyProject[_0xe831[23]](_0x3579x11[_0xe831[22]][_0xe831[21]])[_0xe831[11]](function(_0x3579x14){if(!_0x3579x14){return _0x3579x7[_0xe831[20]](404)};var _0x3579xf=_[_0xe831[33]](_0x3579x14,_0x3579x11[_0xe831[31]]);_0x3579xf[_0xe831[34]]()[_0xe831[11]](function(){return _0x3579x7[_0xe831[8]](200)[_0xe831[7]](_0x3579x14)})[_0xe831[15]](function(_0x3579x8){return handleError(_0x3579x7,_0x3579x8)})})[_0xe831[15]](function(_0x3579x8){return handleError(_0x3579x7,_0x3579x8)})};exports[_0xe831[13]]=function(_0x3579x11,_0x3579x7){JscriptyProject[_0xe831[35]]({where:{id:_0x3579x11[_0xe831[22]][_0xe831[21]]}})[_0xe831[11]](function(_0x3579x14){if(!_0x3579x14){return _0x3579x7[_0xe831[20]](404)};_0x3579x14[_0xe831[13]]()[_0xe831[11]](function(){return _0x3579x7[_0xe831[20]](204)})[_0xe831[15]](function(_0x3579x8){return handleError(_0x3579x7,_0x3579x8)})})[_0xe831[15]](function(_0x3579x8){return handleError(_0x3579x7,_0x3579x8)})};exports[_0xe831[36]]=function(_0x3579x11,_0x3579x7){JscriptyProject[_0xe831[13]]({where:{id:_0x3579x11[_0xe831[16]][_0xe831[37]]},individualHooks:true})[_0xe831[11]](function(){return _0x3579x7[_0xe831[20]](204)})[_0xe831[15]](function(_0x3579x8){return handleError(_0x3579x7,_0x3579x8)})};exports[_0xe831[38]]=function(_0x3579x11,_0x3579x7,_0x3579x12){JscriptyProject[_0xe831[23]](_0x3579x11[_0xe831[22]][_0xe831[21]])[_0xe831[11]](function(_0x3579x14){if(!_0x3579x14){return _0x3579x7[_0xe831[20]](404)};console[_0xe831[40]](_0x3579x11[_0xe831[16]][_0xe831[39]]);_0x3579x7[_0xe831[44]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E":_0xe831[41]+_0x3579x11[_0xe831[16]][_0xe831[39]]+_0xe831[42],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xe831[43]});return _0x3579x7[_0xe831[7]](_0x3579x14[_0xe831[45]])})[_0xe831[15]](function(_0x3579x8){return handleError(_0x3579x7,_0x3579x8)})};exports[_0xe831[46]]=function(_0x3579x11,_0x3579x7,_0x3579x12){JscriptyProject[_0xe831[23]](_0x3579x11[_0xe831[22]][_0xe831[21]])[_0xe831[11]](function(_0x3579x14){if(!_0x3579x14){return _0x3579x7[_0xe831[20]](404)};xml[_0xe831[47]](_0x3579x14[_0xe831[45]],{normalizeTags:true,explicitArray:false},function(_0x3579x8,_0x3579x13){console[_0xe831[40]](_0x3579x13);return _0x3579x7[_0xe831[8]](200)[_0xe831[7]](_0x3579x13)})})[_0xe831[15]](function(_0x3579x8){return handleError(_0x3579x7,_0x3579x8)})}
\ No newline at end of file