372c1a9de145f0ef9249662bbd4c8e07eb52eed3
[motion.git] / server / api / report_dial / report_dial.controller.js
1 var _0xfe7b=["\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","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\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","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x72\x6F\x77\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x70\x6C\x69\x74","\x6E\x61\x6D\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x6C\x65\x6E\x67\x74\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x63\x74\x69\x76\x65\x43\x61\x6C\x6C\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xfe7b[0];var _=require(_0xfe7b[1]);var logger=require(_0xfe7b[3])(_0xfe7b[2]);var sequelize=require(_0xfe7b[5])[_0xfe7b[4]];var ReportDial=require(_0xfe7b[5])[_0xfe7b[6]];var ReportDialHistory=require(_0xfe7b[5])[_0xfe7b[8]][_0xfe7b[7]];var Util=require(_0xfe7b[9]);function handleError(_0xa6fcx8,_0xa6fcx9){_0xa6fcx9= _0xa6fcx9|| 500;return function(_0xa6fcxa){logger[_0xfe7b[11]](_0xa6fcxa[_0xfe7b[10]]);_0xa6fcx8[_0xfe7b[13]](_0xa6fcx9)[_0xfe7b[12]](_0xa6fcxa)}}function responseWithResult(_0xa6fcx8,_0xa6fcx9){_0xa6fcx9= _0xa6fcx9|| 200;return function(_0xa6fcxc){if(_0xa6fcxc){_0xa6fcx8[_0xfe7b[13]](_0xa6fcx9)[_0xfe7b[14]](_0xa6fcxc)}}}function handleEntityNotFound(_0xa6fcx8){return function(_0xa6fcxc){if(!_0xa6fcxc){_0xa6fcx8[_0xfe7b[13]](404)[_0xfe7b[15]]();return null};return _0xa6fcxc}}function saveUpdates(_0xa6fcxf){return function(_0xa6fcxc){return _0xa6fcxc[_0xfe7b[17]](_0xa6fcxf)[_0xfe7b[16]](function(_0xa6fcx10){return _0xa6fcx10})}}function removeEntity(_0xa6fcx8){return function(_0xa6fcxc){if(_0xa6fcxc){return _0xa6fcxc[_0xfe7b[18]]()[_0xfe7b[16]](function(){_0xa6fcx8[_0xfe7b[13]](204)[_0xfe7b[15]]()})}}}exports[_0xfe7b[19]]= function(_0xa6fcx12,_0xa6fcx8,_0xa6fcx13){return ReportDial[_0xfe7b[33]](Util[_0xfe7b[32]](_0xa6fcx12[_0xfe7b[31]]))[_0xfe7b[16]](function(_0xa6fcx14){if(_0xa6fcx12[_0xfe7b[22]][_0xfe7b[21]]=== _0xfe7b[23]){var _0xa6fcx15=[];_[_0xfe7b[29]](_0xa6fcx14[_0xfe7b[24]],function(_0xa6fcx16){if(_0xa6fcx16[_0xfe7b[25]]&& _0xa6fcx16[_0xfe7b[25]][_0xfe7b[26]](/\/|-/)[1]=== _0xa6fcx12[_0xfe7b[22]][_0xfe7b[27]]){_0xa6fcx15[_0xfe7b[28]](_0xa6fcx16)}});return {rows:_0xa6fcx15,count:_0xa6fcx15[_0xfe7b[30]]}};return _0xa6fcx14})[_0xfe7b[16]](function(_0xa6fcx14){return _0xa6fcx8[_0xfe7b[13]](200)[_0xfe7b[12]](_0xa6fcx14)})[_0xfe7b[20]](handleError(_0xa6fcx8))};exports[_0xfe7b[34]]= function(_0xa6fcx12,_0xa6fcx8){return ReportDial[_0xfe7b[35]](Util[_0xfe7b[32]](_0xa6fcx12[_0xfe7b[31]],{endtime:null}))[_0xfe7b[16]](function(_0xa6fcx14){return _0xa6fcx8[_0xfe7b[13]](200)[_0xfe7b[12]]({rows:_0xa6fcx14,count:_0xa6fcx14[_0xfe7b[30]]})})[_0xfe7b[20]](handleError(_0xa6fcx8))};exports[_0xfe7b[36]]= function(_0xa6fcx12,_0xa6fcx8){return ReportDialHistory[_0xfe7b[36]]()[_0xfe7b[16]](function(_0xa6fcx17){return _0xa6fcx8[_0xfe7b[13]](200)[_0xfe7b[12]](_0xa6fcx17)})[_0xfe7b[20]](handleError(_0xa6fcx8))}