Built motion from commit 20e1a16.|0.0.54
[motion.git] / server / api / jscripty_project / jscripty_project.controller.js
1 var _0x621c=["\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"];_0x621c[0];var xml=require(_0x621c[1]);var _=require(_0x621c[2]);var JscriptyProject=require(_0x621c[4])[_0x621c[3]];var Util=require(_0x621c[5]);var sequelize=require(_0x621c[4])[_0x621c[6]];function handleError(_0xfd5ax7,_0xfd5ax8){return _0xfd5ax7[_0x621c[8]](500)[_0x621c[7]](_0xfd5ax8)}function responseWithResult(_0xfd5ax7,_0xfd5axa){_0xfd5axa=_0xfd5axa||200;return function(_0xfd5axb){if(_0xfd5axb){_0xfd5ax7[_0x621c[8]](_0xfd5axa)[_0x621c[9]](_0xfd5axb)}}}function handleEntityNotFound(_0xfd5ax7){return function(_0xfd5axb){if(!_0xfd5axb){_0xfd5ax7[_0x621c[8]](404)[_0x621c[10]]();return null};return _0xfd5axb}}function saveUpdates(_0xfd5axe){return function(_0xfd5axb){return _0xfd5axb[_0x621c[12]](_0xfd5axe)[_0x621c[11]](function(_0xfd5axf){return _0xfd5axf})}}function removeEntity(_0xfd5ax7){return function(_0xfd5axb){if(_0xfd5axb){return _0xfd5axb[_0x621c[13]]()[_0x621c[11]](function(){_0xfd5ax7[_0x621c[8]](204)[_0x621c[10]]()})}}}exports[_0x621c[14]]=function(_0xfd5ax11,_0xfd5ax7,_0xfd5ax12){return JscriptyProject[_0x621c[18]](Util[_0x621c[17]](_0xfd5ax11[_0x621c[16]]))[_0x621c[11]](function(_0xfd5ax13){_0xfd5ax7[_0x621c[8]](200)[_0x621c[7]](_0xfd5ax13)})[_0x621c[15]](function(_0xfd5ax8){return handleError(_0xfd5ax7,_0xfd5ax8)})};exports[_0x621c[19]]=function(_0xfd5ax11,_0xfd5ax7){return JscriptyProject[_0x621c[23]](_0xfd5ax11[_0x621c[22]][_0x621c[21]])[_0x621c[11]](function(_0xfd5ax14){if(!_0xfd5ax14){return _0xfd5ax7[_0x621c[20]](404)};return _0xfd5ax7[_0x621c[7]](_0xfd5ax14)})[_0x621c[15]](function(_0xfd5ax8){return handleError(_0xfd5ax7,_0xfd5ax8)})};exports[_0x621c[24]]=function(_0xfd5ax11,_0xfd5ax7){return JscriptyProject[_0x621c[24]](_0xfd5ax11[_0x621c[31]])[_0x621c[11]](function(_0xfd5ax14){return _0xfd5ax7[_0x621c[8]](201)[_0x621c[7]](_0xfd5ax14)})[_0x621c[15]](sequelize.UniqueConstraintError,function(_0xfd5ax8){if(_0xfd5ax8[_0x621c[26]][_0x621c[25]]){_0xfd5ax8[_0x621c[27]]=_0x621c[28];_0xfd5ax8[_0x621c[29]]=_0x621c[30]};return handleError(_0xfd5ax7,_0xfd5ax8)})[_0x621c[15]](function(_0xfd5ax8){return handleError(_0xfd5ax7,_0xfd5ax8)})};exports[_0x621c[32]]=function(_0xfd5ax11,_0xfd5ax7){if(_0xfd5ax11[_0x621c[31]][_0x621c[21]]){delete _0xfd5ax11[_0x621c[31]][_0x621c[21]]};JscriptyProject[_0x621c[23]](_0xfd5ax11[_0x621c[22]][_0x621c[21]])[_0x621c[11]](function(_0xfd5ax14){if(!_0xfd5ax14){return _0xfd5ax7[_0x621c[20]](404)};var _0xfd5axf=_[_0x621c[33]](_0xfd5ax14,_0xfd5ax11[_0x621c[31]]);_0xfd5axf[_0x621c[34]]()[_0x621c[11]](function(){return _0xfd5ax7[_0x621c[8]](200)[_0x621c[7]](_0xfd5ax14)})[_0x621c[15]](function(_0xfd5ax8){return handleError(_0xfd5ax7,_0xfd5ax8)})})[_0x621c[15]](function(_0xfd5ax8){return handleError(_0xfd5ax7,_0xfd5ax8)})};exports[_0x621c[13]]=function(_0xfd5ax11,_0xfd5ax7){JscriptyProject[_0x621c[35]]({where:{id:_0xfd5ax11[_0x621c[22]][_0x621c[21]]}})[_0x621c[11]](function(_0xfd5ax14){if(!_0xfd5ax14){return _0xfd5ax7[_0x621c[20]](404)};_0xfd5ax14[_0x621c[13]]()[_0x621c[11]](function(){return _0xfd5ax7[_0x621c[20]](204)})[_0x621c[15]](function(_0xfd5ax8){return handleError(_0xfd5ax7,_0xfd5ax8)})})[_0x621c[15]](function(_0xfd5ax8){return handleError(_0xfd5ax7,_0xfd5ax8)})};exports[_0x621c[36]]=function(_0xfd5ax11,_0xfd5ax7){JscriptyProject[_0x621c[13]]({where:{id:_0xfd5ax11[_0x621c[16]][_0x621c[37]]},individualHooks:true})[_0x621c[11]](function(){return _0xfd5ax7[_0x621c[20]](204)})[_0x621c[15]](function(_0xfd5ax8){return handleError(_0xfd5ax7,_0xfd5ax8)})};exports[_0x621c[38]]=function(_0xfd5ax11,_0xfd5ax7,_0xfd5ax12){JscriptyProject[_0x621c[23]](_0xfd5ax11[_0x621c[22]][_0x621c[21]])[_0x621c[11]](function(_0xfd5ax14){if(!_0xfd5ax14){return _0xfd5ax7[_0x621c[20]](404)};console[_0x621c[40]](_0xfd5ax11[_0x621c[16]][_0x621c[39]]);_0xfd5ax7[_0x621c[44]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E":_0x621c[41]+_0xfd5ax11[_0x621c[16]][_0x621c[39]]+_0x621c[42],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x621c[43]});return _0xfd5ax7[_0x621c[7]](_0xfd5ax14[_0x621c[45]])})[_0x621c[15]](function(_0xfd5ax8){return handleError(_0xfd5ax7,_0xfd5ax8)})};exports[_0x621c[46]]=function(_0xfd5ax11,_0xfd5ax7,_0xfd5ax12){JscriptyProject[_0x621c[23]](_0xfd5ax11[_0x621c[22]][_0x621c[21]])[_0x621c[11]](function(_0xfd5ax14){if(!_0xfd5ax14){return _0xfd5ax7[_0x621c[20]](404)};xml[_0x621c[47]](_0xfd5ax14[_0x621c[45]],{normalizeTags:true,explicitArray:false},function(_0xfd5ax8,_0xfd5ax13){console[_0x621c[40]](_0xfd5ax13);return _0xfd5ax7[_0x621c[8]](200)[_0x621c[7]](_0xfd5ax13)})})[_0x621c[15]](function(_0xfd5ax8){return handleError(_0xfd5ax7,_0xfd5ax8)})}