Built motion from commit c2984ba.|0.0.114
[motion.git] / server / api / setting / setting.controller.js
1 var _0xdc29=["\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","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x6F\x6F\x6C\x73\x2F\x73\x79\x73\x74\x65\x6D","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\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","\x73\x74\x61\x74\x73","\x6C\x6F\x67","\x63\x68\x65\x63\x6B\x53\x74\x61\x74\x75\x73","\x61\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","\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","\x63\x72\x65\x61\x74\x65\x53\x6D\x74\x70","\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x53\x6D\x74\x70","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xdc29[0];var _=require(_0xdc29[1]);var Settings=require(_0xdc29[3])[_0xdc29[2]];var system=require(_0xdc29[4]);var Agent=require(_0xdc29[3])[_0xdc29[5]];var VoiceMail=require(_0xdc29[3])[_0xdc29[6]];var MailServerOut=require(_0xdc29[3])[_0xdc29[7]];var Promise=require(_0xdc29[8]);exports[_0xdc29[9]]= function(_0xd59dx8,_0xd59dx9){return Settings[_0xdc29[14]]()[_0xdc29[13]](function(_0xd59dxb){return _0xd59dx9[_0xdc29[12]](200)[_0xdc29[11]](_0xd59dxb)})[_0xdc29[10]](function(_0xd59dxa){return handleError(_0xd59dx9,_0xd59dxa)})};exports[_0xdc29[15]]= function(_0xd59dx8,_0xd59dx9){return Promise[_0xdc29[18]]([])[_0xdc29[13]](system[_0xdc29[17]]())[_0xdc29[13]](function(_0xd59dxc){return _0xd59dx9[_0xdc29[12]](200)[_0xdc29[11]](_0xd59dxc)})[_0xdc29[10]](function(_0xd59dxa){console[_0xdc29[16]](_0xd59dxa);return handleError(_0xd59dx9,_0xd59dxa)})};exports[_0xdc29[19]]= function(_0xd59dx8,_0xd59dx9){var _0xd59dxd;return Settings[_0xdc29[24]](1)[_0xdc29[13]](function(_0xd59dxb){_0xd59dxd= _0xd59dxb;return Agent[_0xdc29[23]](_0xdc29[22])})[_0xdc29[13]](function(_0xd59dxe){var _0xd59dxf={value:0};if(_0xd59dxe){_0xd59dxf[_0xdc29[20]]=  ++_0xd59dxe}else {_0xd59dxf[_0xdc29[20]]= _0xd59dxd[_0xdc29[21]]};return _0xd59dx9[_0xdc29[12]](200)[_0xdc29[11]](_0xd59dxf)})[_0xdc29[10]](function(_0xd59dxa){return handleError(_0xd59dx9,_0xd59dxa)})};exports[_0xdc29[25]]= function(_0xd59dx8,_0xd59dx9){var _0xd59dxd;return Settings[_0xdc29[24]](1)[_0xdc29[13]](function(_0xd59dxb){_0xd59dxd= _0xd59dxb;return VoiceMail[_0xdc29[23]](_0xdc29[27])})[_0xdc29[13]](function(_0xd59dx10){var _0xd59dx11={value:0};if(_0xd59dx10){_0xd59dx11[_0xdc29[20]]=  ++_0xd59dx10}else {_0xd59dx11[_0xdc29[20]]= _0xd59dxd[_0xdc29[26]]};return _0xd59dx9[_0xdc29[12]](200)[_0xdc29[11]](_0xd59dx11)})[_0xdc29[10]](function(_0xd59dxa){console[_0xdc29[16]](_0xd59dxa);return handleError(_0xd59dx9,_0xd59dxa)})};exports[_0xdc29[28]]= function(_0xd59dx8,_0xd59dx9){var _0xd59dx12=require(_0xdc29[29]);return _0xd59dx9[_0xdc29[12]](200)[_0xdc29[11]]({name:_0xd59dx12[_0xdc29[30]],version:_0xd59dx12[_0xdc29[31]],engines:_0xd59dx12[_0xdc29[32]]})};exports[_0xdc29[33]]= function(_0xd59dx8,_0xd59dx9){return Settings[_0xdc29[24]](_0xd59dx8[_0xdc29[36]][_0xdc29[35]])[_0xdc29[13]](function(_0xd59dx13){if(!_0xd59dx13){return _0xd59dx9[_0xdc29[34]](404)};return _0xd59dx9[_0xdc29[11]](_0xd59dx13)})[_0xdc29[10]](function(_0xd59dxa){return handleError(_0xd59dx9,_0xd59dxa)})};exports[_0xdc29[37]]= function(_0xd59dx8,_0xd59dx9){return Settings[_0xdc29[37]](_0xd59dx8[_0xdc29[38]])[_0xdc29[13]](function(_0xd59dx13){return _0xd59dx9[_0xdc29[12]](201)[_0xdc29[11]](_0xd59dx13)})[_0xdc29[10]](function(_0xd59dxa){return handleError(_0xd59dx9,_0xd59dxa)})};exports[_0xdc29[39]]= function(_0xd59dx8,_0xd59dx9){var _0xd59dx14;return MailServerOut[_0xdc29[37]](_0xd59dx8[_0xdc29[38]])[_0xdc29[13]](function(_0xd59dx15){_0xd59dx14= _0xd59dx15;return MailServerOut[_0xdc29[40]]({service:false},{where:{id:{$ne:_0xd59dx15[_0xdc29[35]]}}})})[_0xdc29[13]](function(){return _0xd59dx9[_0xdc29[12]](201)[_0xdc29[11]](_0xd59dx14)})[_0xdc29[10]](function(_0xd59dxa){return handleError(_0xd59dx9,_0xd59dxa)})};exports[_0xdc29[41]]= function(_0xd59dx8,_0xd59dx9){return MailServerOut[_0xdc29[40]]({service:false},{where:{id:{$ne:_0xd59dx8[_0xdc29[38]][_0xdc29[35]]}}})[_0xdc29[13]](function(){return MailServerOut[_0xdc29[40]](_0xd59dx8[_0xdc29[38]],{where:{id:_0xd59dx8[_0xdc29[38]][_0xdc29[35]]}})})[_0xdc29[13]](function(_0xd59dx15){return _0xd59dx9[_0xdc29[34]](200)})[_0xdc29[10]](function(_0xd59dxa){return handleError(_0xd59dx9,_0xd59dxa)})};exports[_0xdc29[40]]= function(_0xd59dx8,_0xd59dx9){if(_0xd59dx8[_0xdc29[38]][_0xdc29[35]]){delete _0xd59dx8[_0xdc29[38]][_0xdc29[35]]};return Settings[_0xdc29[24]](_0xd59dx8[_0xdc29[36]][_0xdc29[35]])[_0xdc29[13]](function(_0xd59dx13){if(!_0xd59dx13){return _0xd59dx9[_0xdc29[34]](404)};var _0xd59dx16=_[_0xdc29[42]](_0xd59dx13,_0xd59dx8[_0xdc29[38]]);return _0xd59dx16[_0xdc29[43]]()})[_0xdc29[13]](function(_0xd59dx13){return _0xd59dx9[_0xdc29[12]](200)[_0xdc29[11]](_0xd59dx13)})[_0xdc29[10]](function(_0xd59dxa){return handleError(_0xd59dx9,_0xd59dxa)})};exports[_0xdc29[44]]= function(_0xd59dx8,_0xd59dx9){return Settings[_0xdc29[24]](_0xd59dx8[_0xdc29[36]][_0xdc29[35]])[_0xdc29[13]](function(_0xd59dx13){if(!_0xd59dx13){return _0xd59dx9[_0xdc29[34]](404)};return _0xd59dx13[_0xdc29[44]]()})[_0xdc29[13]](function(){return _0xd59dx9[_0xdc29[34]](204)})[_0xdc29[10]](function(_0xd59dxa){return handleError(_0xd59dx9,_0xd59dxa)})};function handleError(_0xd59dx9,_0xd59dxa){return _0xd59dx9[_0xdc29[12]](500)[_0xdc29[11]](_0xd59dxa)}