Built motion from commit 36b8e3b.|0.0.111
[motion.git] / server / api / setting / setting.controller.js
1 var _0x2f08=["\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","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\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","\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"];_0x2f08[0];var _=require(_0x2f08[1]);var Settings=require(_0x2f08[3])[_0x2f08[2]];var Agent=require(_0x2f08[3])[_0x2f08[4]];var VoiceMail=require(_0x2f08[3])[_0x2f08[5]];var MailServerOut=require(_0x2f08[3])[_0x2f08[6]];exports[_0x2f08[7]]=function(_0x9250x6,_0x9250x7){return Settings[_0x2f08[12]]()[_0x2f08[11]](function(_0x9250x9){return _0x9250x7[_0x2f08[10]](200)[_0x2f08[9]](_0x9250x9)})[_0x2f08[8]](function(_0x9250x8){return handleError(_0x9250x7,_0x9250x8)})};exports[_0x2f08[13]]=function(_0x9250x6,_0x9250x7){var _0x9250xa;return Settings[_0x2f08[18]](1)[_0x2f08[11]](function(_0x9250x9){_0x9250xa=_0x9250x9;return Agent[_0x2f08[17]](_0x2f08[16])})[_0x2f08[11]](function(_0x9250xb){var _0x9250xc={value:0};if(_0x9250xb){_0x9250xc[_0x2f08[14]]= ++_0x9250xb}else {_0x9250xc[_0x2f08[14]]=_0x9250xa[_0x2f08[15]]};return _0x9250x7[_0x2f08[10]](200)[_0x2f08[9]](_0x9250xc)})[_0x2f08[8]](function(_0x9250x8){return handleError(_0x9250x7,_0x9250x8)})};exports[_0x2f08[19]]=function(_0x9250x6,_0x9250x7){var _0x9250xa;return Settings[_0x2f08[18]](1)[_0x2f08[11]](function(_0x9250x9){_0x9250xa=_0x9250x9;return VoiceMail[_0x2f08[17]](_0x2f08[22])})[_0x2f08[11]](function(_0x9250xd){var _0x9250xe={value:0};if(_0x9250xd){_0x9250xe[_0x2f08[14]]= ++_0x9250xd}else {_0x9250xe[_0x2f08[14]]=_0x9250xa[_0x2f08[21]]};return _0x9250x7[_0x2f08[10]](200)[_0x2f08[9]](_0x9250xe)})[_0x2f08[8]](function(_0x9250x8){console[_0x2f08[20]](_0x9250x8);return handleError(_0x9250x7,_0x9250x8)})};exports[_0x2f08[23]]=function(_0x9250x6,_0x9250x7){var _0x9250xf=require(_0x2f08[24]);return _0x9250x7[_0x2f08[10]](200)[_0x2f08[9]]({name:_0x9250xf[_0x2f08[25]],version:_0x9250xf[_0x2f08[26]],engines:_0x9250xf[_0x2f08[27]]})};exports[_0x2f08[28]]=function(_0x9250x6,_0x9250x7){return Settings[_0x2f08[18]](_0x9250x6[_0x2f08[31]][_0x2f08[30]])[_0x2f08[11]](function(_0x9250x10){if(!_0x9250x10){return _0x9250x7[_0x2f08[29]](404)};return _0x9250x7[_0x2f08[9]](_0x9250x10)})[_0x2f08[8]](function(_0x9250x8){return handleError(_0x9250x7,_0x9250x8)})};exports[_0x2f08[32]]=function(_0x9250x6,_0x9250x7){return Settings[_0x2f08[32]](_0x9250x6[_0x2f08[33]])[_0x2f08[11]](function(_0x9250x10){return _0x9250x7[_0x2f08[10]](201)[_0x2f08[9]](_0x9250x10)})[_0x2f08[8]](function(_0x9250x8){return handleError(_0x9250x7,_0x9250x8)})};exports[_0x2f08[34]]=function(_0x9250x6,_0x9250x7){var _0x9250x11;return MailServerOut[_0x2f08[32]](_0x9250x6[_0x2f08[33]])[_0x2f08[11]](function(_0x9250x12){_0x9250x11=_0x9250x12;return MailServerOut[_0x2f08[35]]({service:false},{where:{id:{$ne:_0x9250x12[_0x2f08[30]]}}})})[_0x2f08[11]](function(){return _0x9250x7[_0x2f08[10]](201)[_0x2f08[9]](_0x9250x11)})[_0x2f08[8]](function(_0x9250x8){return handleError(_0x9250x7,_0x9250x8)})};exports[_0x2f08[36]]=function(_0x9250x6,_0x9250x7){return MailServerOut[_0x2f08[35]]({service:false},{where:{id:{$ne:_0x9250x6[_0x2f08[33]][_0x2f08[30]]}}})[_0x2f08[11]](function(){return MailServerOut[_0x2f08[35]](_0x9250x6[_0x2f08[33]],{where:{id:_0x9250x6[_0x2f08[33]][_0x2f08[30]]}})})[_0x2f08[11]](function(_0x9250x12){return _0x9250x7[_0x2f08[29]](200)})[_0x2f08[8]](function(_0x9250x8){return handleError(_0x9250x7,_0x9250x8)})};exports[_0x2f08[35]]=function(_0x9250x6,_0x9250x7){if(_0x9250x6[_0x2f08[33]][_0x2f08[30]]){delete _0x9250x6[_0x2f08[33]][_0x2f08[30]]};return Settings[_0x2f08[18]](_0x9250x6[_0x2f08[31]][_0x2f08[30]])[_0x2f08[11]](function(_0x9250x10){if(!_0x9250x10){return _0x9250x7[_0x2f08[29]](404)};var _0x9250x13=_[_0x2f08[37]](_0x9250x10,_0x9250x6[_0x2f08[33]]);return _0x9250x13[_0x2f08[38]]()})[_0x2f08[11]](function(_0x9250x10){return _0x9250x7[_0x2f08[10]](200)[_0x2f08[9]](_0x9250x10)})[_0x2f08[8]](function(_0x9250x8){return handleError(_0x9250x7,_0x9250x8)})};exports[_0x2f08[39]]=function(_0x9250x6,_0x9250x7){return Settings[_0x2f08[18]](_0x9250x6[_0x2f08[31]][_0x2f08[30]])[_0x2f08[11]](function(_0x9250x10){if(!_0x9250x10){return _0x9250x7[_0x2f08[29]](404)};return _0x9250x10[_0x2f08[39]]()})[_0x2f08[11]](function(){return _0x9250x7[_0x2f08[29]](204)})[_0x2f08[8]](function(_0x9250x8){return handleError(_0x9250x7,_0x9250x8)})};function handleError(_0x9250x7,_0x9250x8){return _0x9250x7[_0x2f08[10]](500)[_0x2f08[9]](_0x9250x8)}