Built motion from commit 6132600.|0.0.40
[motion.git] / server / api / agent / agent.controller.js
1 var _0xe400=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x61\x6D","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\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","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\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","\x69\x6E\x74\x65\x72\x6E\x61\x6C\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x62\x6F\x64\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x63\x68\x61\x6E\x67\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x6C\x6F\x67","\x75\x73\x65\x72","\x6F\x6C\x64\x50\x61\x73\x73\x77\x6F\x72\x64","\x6E\x65\x77\x50\x61\x73\x73\x77\x6F\x72\x64","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x61\x67\x65\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x63\x6F\x75\x6E\x74"];_0xe400[0];var _=require(_0xe400[1]);var Util=require(_0xe400[2]);var Agent=require(_0xe400[4])[_0xe400[3]];var Team=require(_0xe400[4])[_0xe400[5]];exports[_0xe400[6]]=function(_0xc383x5,_0xc383x6,_0xc383x7){return Agent[_0xe400[15]](_0xe400[14])[_0xe400[13]](Util[_0xe400[12]](_0xc383x5[_0xe400[11]]))[_0xe400[10]](function(_0xc383x9){_0xc383x6[_0xe400[9]](200)[_0xe400[8]](_0xc383x9)})[_0xe400[7]](function(_0xc383x8){return handleError(_0xc383x6,_0xc383x8)})};exports[_0xe400[16]]=function(_0xc383x5,_0xc383x6){return Agent[_0xe400[15]](_0xe400[14])[_0xe400[20]](_0xc383x5[_0xe400[19]][_0xe400[18]])[_0xe400[10]](function(_0xc383xa){if(!_0xc383xa){return _0xc383x6[_0xe400[17]](404)};return _0xc383x6[_0xe400[8]](_0xc383xa);})[_0xe400[7]](function(_0xc383x8){return handleError(_0xc383x6,_0xc383x8)})};exports[_0xe400[21]]=function(_0xc383x5,_0xc383x6){return Agent[_0xe400[24]]({where:{internal:_0xc383x5[_0xe400[23]][_0xe400[22]]}})[_0xe400[10]](function(_0xc383xb){if(!_0xc383xb){return _0xc383x6[_0xe400[17]](404)};return _0xc383x6[_0xe400[8]](_0xc383xb);})[_0xe400[7]](function(_0xc383x8){return handleError(_0xc383x6,_0xc383x8)})};exports[_0xe400[25]]=function(_0xc383x5,_0xc383x6){var _0xc383xc;return Agent[_0xe400[15]](_0xe400[14])[_0xe400[25]](_0xc383x5[_0xe400[23]])[_0xe400[10]](function(_0xc383xa){_0xc383xc=_0xc383xa;return Team[_0xe400[27]]({where:{defaultEntry:true}});})[_0xe400[10]](function(_0xc383xd){return _0xc383xd[_0xe400[26]](_0xc383xc[_0xe400[18]])})[_0xe400[10]](function(){return _0xc383x6[_0xe400[9]](201)[_0xe400[8]](_0xc383xc)})[_0xe400[7]](function(_0xc383x8){return handleError(_0xc383x6,_0xc383x8)});};exports[_0xe400[28]]=function(_0xc383x5,_0xc383x6){if(_0xc383x5[_0xe400[23]][_0xe400[18]]){delete _0xc383x5[_0xe400[23]][_0xe400[18]]};return Agent[_0xe400[20]](_0xc383x5[_0xe400[19]][_0xe400[18]])[_0xe400[10]](function(_0xc383xa){if(!_0xc383xa){return _0xc383x6[_0xe400[17]](404)};var _0xc383xe=_[_0xe400[29]](_0xc383xa,_0xc383x5[_0xe400[23]]);return _0xc383xe[_0xe400[30]]();})[_0xe400[10]](function(_0xc383xa){return _0xc383x6[_0xe400[9]](200)[_0xe400[8]](_0xc383xa)})[_0xe400[7]](function(_0xc383x8){return handleError(_0xc383x6,_0xc383x8)});};exports[_0xe400[31]]=function(_0xc383x5,_0xc383x6){return Agent[_0xe400[20]](_0xc383x5[_0xe400[19]][_0xe400[18]])[_0xe400[10]](function(_0xc383xa){if(!_0xc383xa){return _0xc383x6[_0xe400[17]](404)};return _0xc383xa[_0xe400[31]]();})[_0xe400[10]](function(){return _0xc383x6[_0xe400[17]](204)})[_0xe400[7]](function(_0xc383x8){return handleError(_0xc383x6,_0xc383x8)})};exports[_0xe400[32]]=function(_0xc383x5,_0xc383x6){return Agent[_0xe400[31]]({where:{id:_0xc383x5[_0xe400[11]][_0xe400[33]]},individualHooks:true})[_0xe400[10]](function(){return _0xc383x6[_0xe400[17]](204)})[_0xe400[7]](function(_0xc383x8){return handleError(_0xc383x6,_0xc383x8)})};exports[_0xe400[34]]=function(_0xc383x5,_0xc383x6,_0xc383x7){console[_0xe400[35]](_0xc383x5[_0xe400[23]]);var _0xc383xf=_0xc383x5[_0xe400[36]][_0xe400[18]];var _0xc383x10=String(_0xc383x5[_0xe400[23]][_0xe400[37]]);var _0xc383x11=String(_0xc383x5[_0xe400[23]][_0xe400[38]]);return Agent[_0xe400[20]](_0xc383xf)[_0xe400[10]](function(_0xc383xa){if(_0xc383xa[_0xe400[39]](_0xc383x10)){_0xc383xa[_0xe400[40]]=_0xc383x11;_0xc383xa[_0xe400[30]]()[_0xe400[10]](function(){_0xc383x6[_0xe400[9]](200)[_0xe400[8]](_0xc383xa)})[_0xe400[7]](function(_0xc383x8){return _0xc383x7(_0xc383x8)});}else {_0xc383x6[_0xe400[17]](403)}});};exports[_0xe400[41]]=function(_0xc383x5,_0xc383x6,_0xc383x7){var _0xc383x12=String(_0xc383x5[_0xe400[23]][_0xe400[38]]);var _0xc383x13;return Agent[_0xe400[20]](_0xc383x5[_0xe400[19]][_0xe400[18]])[_0xe400[10]](function(_0xc383x14){_0xc383x13=_0xc383x14;_0xc383x13[_0xe400[40]]=_0xc383x12;_0xc383x13[_0xe400[30]]();})[_0xe400[10]](function(){_0xc383x6[_0xe400[9]](200)[_0xe400[8]](_0xc383x13)})[_0xe400[7]](function(_0xc383x8){return handleError(_0xc383x6,_0xc383x8)});};exports[_0xe400[42]]=function(_0xc383x5,_0xc383x6){var _0xc383x15={};_0xc383x15[_0xc383x5[_0xe400[19]][_0xe400[43]]]=_0xc383x5[_0xe400[23]][_0xe400[44]];Agent[_0xe400[13]]({where:_0xc383x15})[_0xe400[10]](function(_0xc383x9){if(_0xc383x9[_0xe400[45]]){return _0xc383x6[_0xe400[9]](200)[_0xe400[8]]({isValid:false,value:_0xc383x5[_0xe400[23]][_0xe400[44]]})};return _0xc383x6[_0xe400[9]](200)[_0xe400[8]]({isValid:true,value:_0xc383x5[_0xe400[23]][_0xe400[44]]});})[_0xe400[7]](function(_0xc383x8){return handleError(_0xc383x6,_0xc383x8)});};function handleError(_0xc383x6,_0xc383x8){return _0xc383x6[_0xe400[9]](500)[_0xe400[8]](_0xc383x8)}