Built motion from commit 5fc88b3.|0.0.60
[motion.git] / server / api / action / action.controller.js
1 var _0x4525=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\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","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x69\x64","\x75\x73\x65\x72","\x72\x6F\x6C\x6C\x62\x61\x63\x6B","\x6C\x6F\x67","\x63\x6F\x6D\x6D\x69\x74","\x70\x61\x72\x61\x6D\x73","\x6D\x65\x72\x67\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65"];_0x4525[0];var _=require(_0x4525[1]);var Action=require(_0x4525[3])[_0x4525[2]];var sequelize=require(_0x4525[3])[_0x4525[4]];function handleError(_0x9df9x5,_0x9df9x6){return _0x9df9x5[_0x4525[6]](500)[_0x4525[5]](_0x9df9x6)}function responseWithResult(_0x9df9x5,_0x9df9x8){_0x9df9x8=_0x9df9x8||200;return function(_0x9df9x9){if(_0x9df9x9){_0x9df9x5[_0x4525[6]](_0x9df9x8)[_0x4525[7]](_0x9df9x9)}}}function handleEntityNotFound(_0x9df9x5){return function(_0x9df9x9){if(!_0x9df9x9){_0x9df9x5[_0x4525[6]](404)[_0x4525[8]]();return null};return _0x9df9x9}}function saveUpdates(_0x9df9xc){return function(_0x9df9x9){return _0x9df9x9[_0x4525[10]](_0x9df9xc)[_0x4525[9]](function(_0x9df9xd){return _0x9df9xd})}}function removeEntity(_0x9df9x5){return function(_0x9df9x9){if(_0x9df9x9){return _0x9df9x9[_0x4525[11]]()[_0x4525[9]](function(){_0x9df9x5[_0x4525[6]](204)[_0x4525[8]]()})}}}exports[_0x4525[12]]=function(_0x9df9xf,_0x9df9x5){Action[_0x4525[14]]()[_0x4525[9]](responseWithResult(_0x9df9x5))[_0x4525[13]](handleError(_0x9df9x5))};exports[_0x4525[15]]=function(_0x9df9xf,_0x9df9x5){};exports[_0x4525[16]]=function(_0x9df9xf,_0x9df9x5,_0x9df9x10){_0x9df9xf[_0x4525[18]][_0x4525[17]]=_0x9df9xf[_0x4525[20]][_0x4525[19]];return sequelize[_0x4525[26]]()[_0x4525[9]](function(_0x9df9x11){return Action[_0x4525[16]](_[_0x4525[25]](_0x9df9xf[_0x4525[18]],_0x9df9xf[_0x4525[24]]),{transaction:_0x9df9x11,body:_0x9df9xf[_0x4525[18]]})[_0x4525[9]](function(_0x9df9x12){_0x9df9x11[_0x4525[23]]();return _0x9df9x5[_0x4525[6]](201)[_0x4525[5]](_0x9df9x12)})[_0x4525[13]](function(_0x9df9x6){_0x9df9x11[_0x4525[21]]();console[_0x4525[22]](_0x9df9x6);return handleError(_0x9df9x5,_0x9df9x6)})})};exports[_0x4525[27]]=function(_0x9df9xf,_0x9df9x5){};exports[_0x4525[11]]=function(_0x9df9xf,_0x9df9x5){}