Built motion from commit 624f16adc.|1.0.34
[motion.git] / server / api / scheduler / scheduler.controller.js
index 2bf3dcf..1b781ce 100644 (file)
@@ -1 +1 @@
-var _0x1876=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x53\x63\x68\x65\x64\x75\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72\x2F\x72\x65\x70\x6F\x72\x74\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x75\x73\x65\x72","\x65\x78\x74\x72\x61\x63\x74\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74","\x74\x79\x70\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x75\x6E\x53\x63\x68\x65\x64\x75\x6C\x65","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x71\x75\x65\x72\x79"];_0x1876[0];var _=require(_0x1876[1]);var logger=require(_0x1876[3])(_0x1876[2]);var Schedule=require(_0x1876[5])[_0x1876[4]];var MailServerOut=require(_0x1876[5])[_0x1876[6]];var Reports=require(_0x1876[7]);function handleError(_0x5802x7,_0x5802x8){_0x5802x8= _0x5802x8|| 500;return function(_0x5802x9){logger[_0x1876[9]](_0x5802x9[_0x1876[8]]);_0x5802x7[_0x1876[11]](_0x5802x8)[_0x1876[10]](_0x5802x9)}}function responseWithResult(_0x5802x7,_0x5802x8){_0x5802x8= _0x5802x8|| 200;return function(_0x5802xb){if(_0x5802xb){_0x5802x7[_0x1876[11]](_0x5802x8)[_0x1876[12]](_0x5802xb)}}}function responseWithoutResult(_0x5802x7,_0x5802x8){_0x5802x8= _0x5802x8|| 200;return function(){_0x5802x7[_0x1876[13]](_0x5802x8)}}function handleEntityNotFound(_0x5802x7){return function(_0x5802xb){if(!_0x5802xb){_0x5802x7[_0x1876[11]](404)[_0x1876[14]]();return null};return _0x5802xb}}function saveUpdates(_0x5802xf){return function(_0x5802xb){return _0x5802xb[_0x1876[16]](_0x5802xf)[_0x1876[15]](function(_0x5802x10){return _0x5802x10})}}function removeEntity(_0x5802x7){return function(_0x5802xb){if(_0x5802xb){return _0x5802xb[_0x1876[17]]()[_0x1876[15]](function(){_0x5802x7[_0x1876[11]](204)[_0x1876[14]]()})}}}function runSchedule(_0x5802x13){return function(_0x5802xb){if(_0x5802xb){switch(_0x5802xb[_0x1876[21]]){case _0x1876[20]:var _0x5802x14= new Reports();_0x5802x14[_0x1876[19]](_0x5802xb,_0x5802x13[_0x1876[18]]);break;default:}}}}exports[_0x1876[22]]= function(_0x5802x13,_0x5802x7){Schedule[_0x1876[24]]()[_0x1876[15]](responseWithResult(_0x5802x7))[_0x1876[23]](handleError(_0x5802x7))};exports[_0x1876[25]]= function(_0x5802x13,_0x5802x7){Schedule[_0x1876[28]](_0x5802x13[_0x1876[27]][_0x1876[26]])[_0x1876[15]](handleEntityNotFound(_0x5802x7))[_0x1876[15]](responseWithResult(_0x5802x7))[_0x1876[23]](handleError(_0x5802x7))};exports[_0x1876[29]]= function(_0x5802x13,_0x5802x7){Schedule[_0x1876[28]](_0x5802x13[_0x1876[27]][_0x1876[26]],{include:[MailServerOut]})[_0x1876[15]](handleEntityNotFound(_0x5802x7))[_0x1876[15]](runSchedule(_0x5802x13))[_0x1876[15]](responseWithoutResult(_0x5802x7))[_0x1876[23]](handleError(_0x5802x7))};exports[_0x1876[30]]= function(_0x5802x13,_0x5802x7){Schedule[_0x1876[30]](_0x5802x13[_0x1876[31]])[_0x1876[15]](responseWithResult(_0x5802x7,201))[_0x1876[23]](handleError(_0x5802x7))};exports[_0x1876[32]]= function(_0x5802x13,_0x5802x7){if(_0x5802x13[_0x1876[31]][_0x1876[26]]){delete _0x5802x13[_0x1876[31]][_0x1876[26]]};Schedule[_0x1876[28]](_0x5802x13[_0x1876[27]][_0x1876[26]])[_0x1876[15]](handleEntityNotFound(_0x5802x7))[_0x1876[15]](saveUpdates(_0x5802x13[_0x1876[31]]))[_0x1876[15]](responseWithResult(_0x5802x7))[_0x1876[23]](handleError(_0x5802x7))};exports[_0x1876[17]]= function(_0x5802x13,_0x5802x7){Schedule[_0x1876[28]](_0x5802x13[_0x1876[27]][_0x1876[26]])[_0x1876[15]](handleEntityNotFound(_0x5802x7))[_0x1876[15]](removeEntity(_0x5802x7))[_0x1876[23]](handleError(_0x5802x7))};exports[_0x1876[33]]= function(_0x5802x13,_0x5802x7){return Schedule[_0x1876[17]]({where:{id:_0x5802x13[_0x1876[35]][_0x1876[34]]},individualHooks:true})[_0x1876[15]](function(){return _0x5802x7[_0x1876[13]](204)})[_0x1876[23]](handleError(_0x5802x7))}
\ No newline at end of file
+var _0xde06=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x53\x63\x68\x65\x64\x75\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72\x2F\x72\x65\x70\x6F\x72\x74\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x75\x73\x65\x72","\x65\x78\x74\x72\x61\x63\x74\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74","\x74\x79\x70\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x75\x6E\x53\x63\x68\x65\x64\x75\x6C\x65","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x71\x75\x65\x72\x79"];_0xde06[0];var _=require(_0xde06[1]);var logger=require(_0xde06[3])(_0xde06[2]);var Schedule=require(_0xde06[5])[_0xde06[4]];var MailServerOut=require(_0xde06[5])[_0xde06[6]];var Reports=require(_0xde06[7]);function handleError(_0x57cbx7,_0x57cbx8){_0x57cbx8= _0x57cbx8|| 500;return function(_0x57cbx9){logger[_0xde06[9]](_0x57cbx9[_0xde06[8]]);_0x57cbx7[_0xde06[11]](_0x57cbx8)[_0xde06[10]](_0x57cbx9)}}function responseWithResult(_0x57cbx7,_0x57cbx8){_0x57cbx8= _0x57cbx8|| 200;return function(_0x57cbxb){if(_0x57cbxb){_0x57cbx7[_0xde06[11]](_0x57cbx8)[_0xde06[12]](_0x57cbxb)}}}function responseWithoutResult(_0x57cbx7,_0x57cbx8){_0x57cbx8= _0x57cbx8|| 200;return function(){_0x57cbx7[_0xde06[13]](_0x57cbx8)}}function handleEntityNotFound(_0x57cbx7){return function(_0x57cbxb){if(!_0x57cbxb){_0x57cbx7[_0xde06[11]](404)[_0xde06[14]]();return null};return _0x57cbxb}}function saveUpdates(_0x57cbxf){return function(_0x57cbxb){return _0x57cbxb[_0xde06[16]](_0x57cbxf)[_0xde06[15]](function(_0x57cbx10){return _0x57cbx10})}}function removeEntity(_0x57cbx7){return function(_0x57cbxb){if(_0x57cbxb){return _0x57cbxb[_0xde06[17]]()[_0xde06[15]](function(){_0x57cbx7[_0xde06[11]](204)[_0xde06[14]]()})}}}function runSchedule(_0x57cbx13){return function(_0x57cbxb){if(_0x57cbxb){switch(_0x57cbxb[_0xde06[21]]){case _0xde06[20]:var _0x57cbx14= new Reports();_0x57cbx14[_0xde06[19]](_0x57cbxb,_0x57cbx13[_0xde06[18]]);break;default:}}}}exports[_0xde06[22]]= function(_0x57cbx13,_0x57cbx7){Schedule[_0xde06[24]]()[_0xde06[15]](responseWithResult(_0x57cbx7))[_0xde06[23]](handleError(_0x57cbx7))};exports[_0xde06[25]]= function(_0x57cbx13,_0x57cbx7){Schedule[_0xde06[28]](_0x57cbx13[_0xde06[27]][_0xde06[26]])[_0xde06[15]](handleEntityNotFound(_0x57cbx7))[_0xde06[15]](responseWithResult(_0x57cbx7))[_0xde06[23]](handleError(_0x57cbx7))};exports[_0xde06[29]]= function(_0x57cbx13,_0x57cbx7){Schedule[_0xde06[28]](_0x57cbx13[_0xde06[27]][_0xde06[26]],{include:[MailServerOut]})[_0xde06[15]](handleEntityNotFound(_0x57cbx7))[_0xde06[15]](runSchedule(_0x57cbx13))[_0xde06[15]](responseWithoutResult(_0x57cbx7))[_0xde06[23]](handleError(_0x57cbx7))};exports[_0xde06[30]]= function(_0x57cbx13,_0x57cbx7){Schedule[_0xde06[30]](_0x57cbx13[_0xde06[31]])[_0xde06[15]](responseWithResult(_0x57cbx7,201))[_0xde06[23]](handleError(_0x57cbx7))};exports[_0xde06[32]]= function(_0x57cbx13,_0x57cbx7){if(_0x57cbx13[_0xde06[31]][_0xde06[26]]){delete _0x57cbx13[_0xde06[31]][_0xde06[26]]};Schedule[_0xde06[28]](_0x57cbx13[_0xde06[27]][_0xde06[26]])[_0xde06[15]](handleEntityNotFound(_0x57cbx7))[_0xde06[15]](saveUpdates(_0x57cbx13[_0xde06[31]]))[_0xde06[15]](responseWithResult(_0x57cbx7))[_0xde06[23]](handleError(_0x57cbx7))};exports[_0xde06[17]]= function(_0x57cbx13,_0x57cbx7){Schedule[_0xde06[28]](_0x57cbx13[_0xde06[27]][_0xde06[26]])[_0xde06[15]](handleEntityNotFound(_0x57cbx7))[_0xde06[15]](removeEntity(_0x57cbx7))[_0xde06[23]](handleError(_0x57cbx7))};exports[_0xde06[33]]= function(_0x57cbx13,_0x57cbx7){return Schedule[_0xde06[17]]({where:{id:_0x57cbx13[_0xde06[35]][_0xde06[34]]},individualHooks:true})[_0xde06[15]](function(){return _0x57cbx7[_0xde06[13]](204)})[_0xde06[23]](handleError(_0x57cbx7))}
\ No newline at end of file