Built motion from commit 98bf79a.|0.0.48
[motion.git] / server / api / setting / setting.controller.js
1 var _0x53f9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x65\x74\x74\x69\x6E\x67\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x6C\x6F\x67","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x61\x70","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6D\x69\x6E\x5F\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x69\x6E\x64\x65\x78\x4F\x66","\x76\x61\x6C\x75\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x49\x6E\x66\x6F","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x70\x61\x63\x6B\x61\x67\x65\x2E\x6A\x73\x6F\x6E","\x6E\x61\x6D\x65","\x76\x65\x72\x73\x69\x6F\x6E","\x65\x6E\x67\x69\x6E\x65\x73","\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","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79"];_0x53f9[0];var _=require(_0x53f9[1]);var Settings=require(_0x53f9[3])[_0x53f9[2]];var Agent=require(_0x53f9[3])[_0x53f9[4]];exports[_0x53f9[5]]=function(_0x87e9x4,_0x87e9x5){Settings[_0x53f9[10]]()[_0x53f9[9]](function(_0x87e9x7){return _0x87e9x5[_0x53f9[8]](200)[_0x53f9[7]](_0x87e9x7)})[_0x53f9[6]](function(_0x87e9x6){return handleError(_0x87e9x5,_0x87e9x6)})};exports[_0x53f9[11]]=function(_0x87e9x4,_0x87e9x5){Settings[_0x53f9[19]]()[_0x53f9[9]](function(_0x87e9x8){Agent[_0x53f9[10]]({where:{internal:{$gte:_0x87e9x8[_0x53f9[16]]}}})[_0x53f9[9]](function(_0x87e9x9){var _0x87e9xa=_[_0x53f9[14]](_[_0x53f9[14]](_0x87e9x9,_0x53f9[13]),_0x53f9[15]);var _0x87e9xb=_0x87e9x8[_0x53f9[16]];var _0x87e9xc={value:null};do{if(_0x87e9xa[_0x53f9[17]](_0x87e9xb)=== -1){_0x87e9xc[_0x53f9[18]]=_0x87e9xb}else {_0x87e9xb++}}while(!_0x87e9xc[_0x53f9[18]]);;return _0x87e9x5[_0x53f9[8]](200)[_0x53f9[7]](_0x87e9xc)})[_0x53f9[6]](function(_0x87e9x6){console[_0x53f9[12]](_0x87e9x6);return handleError(_0x87e9x5,_0x87e9x6)})})[_0x53f9[6]](function(_0x87e9x6){return handleError(_0x87e9x5,_0x87e9x6)})};exports[_0x53f9[20]]=function(_0x87e9x4,_0x87e9x5){var _0x87e9xd=require(_0x53f9[21]);return _0x87e9x5[_0x53f9[8]](200)[_0x53f9[7]]({name:_0x87e9xd[_0x53f9[22]],version:_0x87e9xd[_0x53f9[23]],engines:_0x87e9xd[_0x53f9[24]]})};exports[_0x53f9[25]]=function(_0x87e9x4,_0x87e9x5){Settings[_0x53f9[29]](_0x87e9x4[_0x53f9[28]][_0x53f9[27]])[_0x53f9[9]](function(_0x87e9xe){if(!_0x87e9xe){return _0x87e9x5[_0x53f9[26]](404)};return _0x87e9x5[_0x53f9[7]](_0x87e9xe)})[_0x53f9[6]](function(_0x87e9x6){return handleError(_0x87e9x5,_0x87e9x6)})};exports[_0x53f9[30]]=function(_0x87e9x4,_0x87e9x5){Settings[_0x53f9[30]](_0x87e9x4[_0x53f9[31]])[_0x53f9[9]](function(_0x87e9xe){return _0x87e9x5[_0x53f9[8]](201)[_0x53f9[7]](_0x87e9xe)})[_0x53f9[6]](function(_0x87e9x6){return handleError(_0x87e9x5,_0x87e9x6)})};exports[_0x53f9[32]]=function(_0x87e9x4,_0x87e9x5){if(_0x87e9x4[_0x53f9[31]][_0x53f9[27]]){delete _0x87e9x4[_0x53f9[31]][_0x53f9[27]]};Settings[_0x53f9[35]]({where:{id:_0x87e9x4[_0x53f9[28]][_0x53f9[27]]}})[_0x53f9[9]](function(_0x87e9xe){if(!_0x87e9xe){return _0x87e9x5[_0x53f9[26]](404)};var _0x87e9xf=_[_0x53f9[33]](_0x87e9xe,_0x87e9x4[_0x53f9[31]]);_0x87e9xf[_0x53f9[34]]()[_0x53f9[9]](function(){return _0x87e9x5[_0x53f9[8]](200)[_0x53f9[7]](_0x87e9xe)})[_0x53f9[6]](function(_0x87e9x6){return handleError(_0x87e9x5,_0x87e9x6)})})[_0x53f9[6]](function(_0x87e9x6){return handleError(_0x87e9x5,_0x87e9x6)})};exports[_0x53f9[36]]=function(_0x87e9x4,_0x87e9x5){Settings[_0x53f9[35]]({where:{id:_0x87e9x4[_0x53f9[28]][_0x53f9[27]]}})[_0x53f9[9]](function(_0x87e9xe){if(!_0x87e9xe){return _0x87e9x5[_0x53f9[26]](404)};_0x87e9xe[_0x53f9[36]]()[_0x53f9[9]](function(){return _0x87e9x5[_0x53f9[26]](204)})[_0x53f9[6]](function(_0x87e9x6){return handleError(_0x87e9x5,_0x87e9x6)})})[_0x53f9[6]](function(_0x87e9x6){return handleError(_0x87e9x5,_0x87e9x6)})};function handleError(_0x87e9x5,_0x87e9x6){return _0x87e9x5[_0x53f9[8]](500)[_0x53f9[7]](_0x87e9x6)}