Built motion from commit b8fca89.|0.0.57
[motion.git] / server / api / setting / setting.controller.js
1 var _0x3fe2=["\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","\x76\x61\x6C\x75\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6D\x61\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","\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"];_0x3fe2[0];var _=require(_0x3fe2[1]);var Settings=require(_0x3fe2[3])[_0x3fe2[2]];var Agent=require(_0x3fe2[3])[_0x3fe2[4]];exports[_0x3fe2[5]]=function(_0xebccx4,_0xebccx5){Settings[_0x3fe2[10]]()[_0x3fe2[9]](function(_0xebccx7){return _0xebccx5[_0x3fe2[8]](200)[_0x3fe2[7]](_0xebccx7)})[_0x3fe2[6]](function(_0xebccx6){return handleError(_0xebccx5,_0xebccx6)})};exports[_0x3fe2[11]]=function(_0xebccx4,_0xebccx5){return Agent[_0x3fe2[14]](_0x3fe2[13])[_0x3fe2[9]](function(_0xebccx8){var _0xebccx9={value:0};if(_0xebccx8){_0xebccx9[_0x3fe2[12]]= ++_0xebccx8};return _0xebccx5[_0x3fe2[8]](200)[_0x3fe2[7]](_0xebccx9)})[_0x3fe2[6]](function(_0xebccx6){return handleError(_0xebccx5,_0xebccx6)})};exports[_0x3fe2[15]]=function(_0xebccx4,_0xebccx5){var _0xebccxa=require(_0x3fe2[16]);return _0xebccx5[_0x3fe2[8]](200)[_0x3fe2[7]]({name:_0xebccxa[_0x3fe2[17]],version:_0xebccxa[_0x3fe2[18]],engines:_0xebccxa[_0x3fe2[19]]})};exports[_0x3fe2[20]]=function(_0xebccx4,_0xebccx5){Settings[_0x3fe2[24]](_0xebccx4[_0x3fe2[23]][_0x3fe2[22]])[_0x3fe2[9]](function(_0xebccxb){if(!_0xebccxb){return _0xebccx5[_0x3fe2[21]](404)};return _0xebccx5[_0x3fe2[7]](_0xebccxb)})[_0x3fe2[6]](function(_0xebccx6){return handleError(_0xebccx5,_0xebccx6)})};exports[_0x3fe2[25]]=function(_0xebccx4,_0xebccx5){Settings[_0x3fe2[25]](_0xebccx4[_0x3fe2[26]])[_0x3fe2[9]](function(_0xebccxb){return _0xebccx5[_0x3fe2[8]](201)[_0x3fe2[7]](_0xebccxb)})[_0x3fe2[6]](function(_0xebccx6){return handleError(_0xebccx5,_0xebccx6)})};exports[_0x3fe2[27]]=function(_0xebccx4,_0xebccx5){if(_0xebccx4[_0x3fe2[26]][_0x3fe2[22]]){delete _0xebccx4[_0x3fe2[26]][_0x3fe2[22]]};Settings[_0x3fe2[30]]({where:{id:_0xebccx4[_0x3fe2[23]][_0x3fe2[22]]}})[_0x3fe2[9]](function(_0xebccxb){if(!_0xebccxb){return _0xebccx5[_0x3fe2[21]](404)};var _0xebccxc=_[_0x3fe2[28]](_0xebccxb,_0xebccx4[_0x3fe2[26]]);_0xebccxc[_0x3fe2[29]]()[_0x3fe2[9]](function(){return _0xebccx5[_0x3fe2[8]](200)[_0x3fe2[7]](_0xebccxb)})[_0x3fe2[6]](function(_0xebccx6){return handleError(_0xebccx5,_0xebccx6)})})[_0x3fe2[6]](function(_0xebccx6){return handleError(_0xebccx5,_0xebccx6)})};exports[_0x3fe2[31]]=function(_0xebccx4,_0xebccx5){Settings[_0x3fe2[30]]({where:{id:_0xebccx4[_0x3fe2[23]][_0x3fe2[22]]}})[_0x3fe2[9]](function(_0xebccxb){if(!_0xebccxb){return _0xebccx5[_0x3fe2[21]](404)};_0xebccxb[_0x3fe2[31]]()[_0x3fe2[9]](function(){return _0xebccx5[_0x3fe2[21]](204)})[_0x3fe2[6]](function(_0xebccx6){return handleError(_0xebccx5,_0xebccx6)})})[_0x3fe2[6]](function(_0xebccx6){return handleError(_0xebccx5,_0xebccx6)})};function handleError(_0xebccx5,_0xebccx6){return _0xebccx5[_0x3fe2[8]](500)[_0x3fe2[7]](_0xebccx6)}