Built motion from commit eae4cb9.|0.0.78
[motion.git] / server / api / setting / setting.controller.js
1 var _0x3e4f=["\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","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C","\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","\x76\x61\x6C\x75\x65","\x6D\x69\x6E\x5F\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6D\x61\x78","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x4D\x61\x69\x6C\x62\x6F\x78","\x6C\x6F\x67","\x6D\x69\x6E\x5F\x6D\x61\x69\x6C\x62\x6F\x78","\x6D\x61\x69\x6C\x62\x6F\x78","\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","\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"];_0x3e4f[0];var _=require(_0x3e4f[1]);var Settings=require(_0x3e4f[3])[_0x3e4f[2]];var Agent=require(_0x3e4f[3])[_0x3e4f[4]];var VoiceMail=require(_0x3e4f[3])[_0x3e4f[5]];exports[_0x3e4f[6]]=function(_0x5741x5,_0x5741x6){return Settings[_0x3e4f[11]]()[_0x3e4f[10]](function(_0x5741x8){return _0x5741x6[_0x3e4f[9]](200)[_0x3e4f[8]](_0x5741x8)})[_0x3e4f[7]](function(_0x5741x7){return handleError(_0x5741x6,_0x5741x7)})};exports[_0x3e4f[12]]=function(_0x5741x5,_0x5741x6){var _0x5741x9;return Settings[_0x3e4f[17]](1)[_0x3e4f[10]](function(_0x5741x8){_0x5741x9=_0x5741x8;return Agent[_0x3e4f[16]](_0x3e4f[15])})[_0x3e4f[10]](function(_0x5741xa){var _0x5741xb={value:0};if(_0x5741xa){_0x5741xb[_0x3e4f[13]]= ++_0x5741xa}else {_0x5741xb[_0x3e4f[13]]=_0x5741x9[_0x3e4f[14]]};return _0x5741x6[_0x3e4f[9]](200)[_0x3e4f[8]](_0x5741xb)})[_0x3e4f[7]](function(_0x5741x7){return handleError(_0x5741x6,_0x5741x7)})};exports[_0x3e4f[18]]=function(_0x5741x5,_0x5741x6){var _0x5741x9;return Settings[_0x3e4f[17]](1)[_0x3e4f[10]](function(_0x5741x8){_0x5741x9=_0x5741x8;return VoiceMail[_0x3e4f[16]](_0x3e4f[21])})[_0x3e4f[10]](function(_0x5741xc){var _0x5741xd={value:0};if(_0x5741xc){_0x5741xd[_0x3e4f[13]]= ++_0x5741xc}else {_0x5741xd[_0x3e4f[13]]=_0x5741x9[_0x3e4f[20]]};return _0x5741x6[_0x3e4f[9]](200)[_0x3e4f[8]](_0x5741xd)})[_0x3e4f[7]](function(_0x5741x7){console[_0x3e4f[19]](_0x5741x7);return handleError(_0x5741x6,_0x5741x7)})};exports[_0x3e4f[22]]=function(_0x5741x5,_0x5741x6){var _0x5741xe=require(_0x3e4f[23]);return _0x5741x6[_0x3e4f[9]](200)[_0x3e4f[8]]({name:_0x5741xe[_0x3e4f[24]],version:_0x5741xe[_0x3e4f[25]],engines:_0x5741xe[_0x3e4f[26]]})};exports[_0x3e4f[27]]=function(_0x5741x5,_0x5741x6){Settings[_0x3e4f[17]](_0x5741x5[_0x3e4f[30]][_0x3e4f[29]])[_0x3e4f[10]](function(_0x5741xf){if(!_0x5741xf){return _0x5741x6[_0x3e4f[28]](404)};return _0x5741x6[_0x3e4f[8]](_0x5741xf)})[_0x3e4f[7]](function(_0x5741x7){return handleError(_0x5741x6,_0x5741x7)})};exports[_0x3e4f[31]]=function(_0x5741x5,_0x5741x6){Settings[_0x3e4f[31]](_0x5741x5[_0x3e4f[32]])[_0x3e4f[10]](function(_0x5741xf){return _0x5741x6[_0x3e4f[9]](201)[_0x3e4f[8]](_0x5741xf)})[_0x3e4f[7]](function(_0x5741x7){return handleError(_0x5741x6,_0x5741x7)})};exports[_0x3e4f[33]]=function(_0x5741x5,_0x5741x6){if(_0x5741x5[_0x3e4f[32]][_0x3e4f[29]]){delete _0x5741x5[_0x3e4f[32]][_0x3e4f[29]]};Settings[_0x3e4f[36]]({where:{id:_0x5741x5[_0x3e4f[30]][_0x3e4f[29]]}})[_0x3e4f[10]](function(_0x5741xf){if(!_0x5741xf){return _0x5741x6[_0x3e4f[28]](404)};var _0x5741x10=_[_0x3e4f[34]](_0x5741xf,_0x5741x5[_0x3e4f[32]]);_0x5741x10[_0x3e4f[35]]()[_0x3e4f[10]](function(){return _0x5741x6[_0x3e4f[9]](200)[_0x3e4f[8]](_0x5741xf)})[_0x3e4f[7]](function(_0x5741x7){return handleError(_0x5741x6,_0x5741x7)})})[_0x3e4f[7]](function(_0x5741x7){return handleError(_0x5741x6,_0x5741x7)})};exports[_0x3e4f[37]]=function(_0x5741x5,_0x5741x6){Settings[_0x3e4f[36]]({where:{id:_0x5741x5[_0x3e4f[30]][_0x3e4f[29]]}})[_0x3e4f[10]](function(_0x5741xf){if(!_0x5741xf){return _0x5741x6[_0x3e4f[28]](404)};_0x5741xf[_0x3e4f[37]]()[_0x3e4f[10]](function(){return _0x5741x6[_0x3e4f[28]](204)})[_0x3e4f[7]](function(_0x5741x7){return handleError(_0x5741x6,_0x5741x7)})})[_0x3e4f[7]](function(_0x5741x7){return handleError(_0x5741x6,_0x5741x7)})};function handleError(_0x5741x6,_0x5741x7){return _0x5741x6[_0x3e4f[9]](500)[_0x3e4f[8]](_0x5741x7)}