Built motion from commit b322525.|0.0.112
[motion.git] / server / api / report_sms_room / report_sms_room.controller.js
index 8738f38..ce23e24 100644 (file)
@@ -1 +1 @@
-var _0x59af=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x52\x6F\x6F\x6D\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x55\x73\x65\x72","\x53\x6D\x73\x51\x75\x65\x75\x65","\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","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x6F\x70\x65\x6E","\x63\x61\x74\x63\x68","\x4F\x50\x45\x4E","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x6E\x65\x77","\x4E\x45\x57","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x69\x6E\x64\x65\x78","\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","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x59af[0];var _=require(_0x59af[1]);var Util=require(_0x59af[2]);var ReportSmsRoom=require(_0x59af[4])[_0x59af[3]];var ReportSmsRoomHistory=require(_0x59af[4])[_0x59af[6]][_0x59af[5]];var User=require(_0x59af[4])[_0x59af[7]];var SmsQueue=require(_0x59af[4])[_0x59af[8]];function handleError(_0x586fx8,_0x586fx9){_0x586fx9=_0x586fx9||500;return function(_0x586fxa){_0x586fx8[_0x59af[10]](_0x586fx9)[_0x59af[9]](_0x586fxa)}}function responseWithResult(_0x586fx8,_0x586fx9){_0x586fx9=_0x586fx9||200;return function(_0x586fxc){if(_0x586fxc){_0x586fx8[_0x59af[10]](_0x586fx9)[_0x59af[11]](_0x586fxc)}}}function responseWithoutResult(_0x586fx8,_0x586fx9){_0x586fx9=_0x586fx9||204;return function(){_0x586fx8[_0x59af[12]](_0x586fx9)}}function handleEntityNotFound(_0x586fx8){return function(_0x586fxc){if(!_0x586fxc){_0x586fx8[_0x59af[10]](404)[_0x59af[13]]();return null};return _0x586fxc}}function saveUpdates(_0x586fx10){return function(_0x586fxc){return _0x586fxc[_0x59af[15]](_0x586fx10)[_0x59af[14]](function(_0x586fx11){return _0x586fx11})}}function removeEntity(_0x586fx8){return function(_0x586fxc){if(_0x586fxc){return _0x586fxc[_0x59af[16]]()[_0x59af[14]](function(){_0x586fx8[_0x59af[10]](204)[_0x59af[13]]()})}}}function getSmsQueues(_0x586fx14){return function(){switch(_0x586fx14[_0x59af[25]]){case _0x59af[24]:return User[_0x59af[23]](_0x586fx14[_0x59af[17]],{attributes:[_0x59af[17]]})[_0x59af[14]](Util[_0x59af[22]]({},{attributes:[_0x59af[17]],include:[{raw:true,model:User,attributes:[_0x59af[17]]}]}))[_0x59af[14]](function(_0x586fx15){var _0x586fx16=[];_0x586fx15[_0x59af[21]][_0x59af[20]](function(_0x586fx17){_0x586fx16=_[_0x59af[19]](_0x586fx16,_[_0x59af[18]](_0x586fx17.Users,_0x59af[17]))});return {where:{$or:{queue:_[_0x59af[18]](_0x586fx15[_0x59af[21]],_0x59af[17]),memberid:_0x586fx16}}}});default:return {}}}}exports[_0x59af[26]]=function(_0x586fx18,_0x586fx8){return Promise[_0x59af[31]]([])[_0x59af[14]](getSmsQueues(_0x586fx18[_0x59af[24]]))[_0x59af[14]](function(_0x586fx1a){return ReportSmsRoom[_0x59af[30]](_[_0x59af[29]]({where:{status:_0x59af[28]}},_0x586fx1a))})[_0x59af[14]](function(_0x586fx19){return _0x586fx8[_0x59af[10]](200)[_0x59af[9]]({value:_0x586fx19})})[_0x59af[27]](handleError(_0x586fx8))};exports[_0x59af[32]]=function(_0x586fx18,_0x586fx8){return Promise[_0x59af[31]]([])[_0x59af[14]](getSmsQueues(_0x586fx18[_0x59af[24]]))[_0x59af[14]](function(_0x586fx1a){return ReportSmsRoom[_0x59af[30]](_[_0x59af[29]]({where:{status:_0x59af[33]}},_0x586fx1a))})[_0x59af[14]](function(_0x586fx19){return _0x586fx8[_0x59af[10]](200)[_0x59af[9]]({value:_0x586fx19})})[_0x59af[27]](handleError(_0x586fx8))};exports[_0x59af[34]]=function(_0x586fx18,_0x586fx8){return Promise[_0x59af[31]]([])[_0x59af[14]](getSmsQueues(_0x586fx18[_0x59af[24]]))[_0x59af[14]](function(_0x586fx1a){return ReportSmsRoom[_0x59af[30]](_[_0x59af[29]]({where:{status:_0x59af[35]}},_0x586fx1a))})[_0x59af[14]](function(_0x586fx19){return _0x586fx8[_0x59af[10]](200)[_0x59af[9]]({value:_0x586fx19})})[_0x59af[27]](handleError(_0x586fx8))};exports[_0x59af[36]]=function(_0x586fx18,_0x586fx8){return Promise[_0x59af[31]]([])[_0x59af[14]](getSmsQueues(_0x586fx18[_0x59af[24]]))[_0x59af[14]](function(_0x586fx1a){return ReportSmsRoom[_0x59af[30]](_[_0x59af[29]]({where:{status:_0x59af[37]}},_0x586fx1a))})[_0x59af[14]](function(_0x586fx19){return _0x586fx8[_0x59af[10]](200)[_0x59af[9]]({value:_0x586fx19})})[_0x59af[27]](handleError(_0x586fx8))};exports[_0x59af[38]]=function(_0x586fx18,_0x586fx8,_0x586fx1b){return ReportSmsRoom[_0x59af[41]](Util[_0x59af[40]](_0x586fx18[_0x59af[39]]))[_0x59af[14]](function(_0x586fx1c){return _0x586fx8[_0x59af[10]](200)[_0x59af[9]](_0x586fx1c)})[_0x59af[27]](handleError(_0x586fx8))};exports[_0x59af[42]]=function(_0x586fx18,_0x586fx8){return ReportSmsRoomHistory[_0x59af[42]]()[_0x59af[14]](responseWithResult(_0x586fx8))[_0x59af[27]](handleError(_0x586fx8))}
\ No newline at end of file
+var _0x8eb2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x52\x6F\x6F\x6D\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x55\x73\x65\x72","\x53\x6D\x73\x51\x75\x65\x75\x65","\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","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x6F\x70\x65\x6E","\x63\x61\x74\x63\x68","\x4F\x50\x45\x4E","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x6E\x65\x77","\x4E\x45\x57","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x69\x6E\x64\x65\x78","\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","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x8eb2[0];var _=require(_0x8eb2[1]);var moment=require(_0x8eb2[2]);var Util=require(_0x8eb2[3]);var ReportSmsRoom=require(_0x8eb2[5])[_0x8eb2[4]];var SmsRoom=require(_0x8eb2[5])[_0x8eb2[6]];var ReportSmsRoomHistory=require(_0x8eb2[5])[_0x8eb2[8]][_0x8eb2[7]];var User=require(_0x8eb2[5])[_0x8eb2[9]];var SmsQueue=require(_0x8eb2[5])[_0x8eb2[10]];function handleError(_0x3237xa,_0x3237xb){_0x3237xb=_0x3237xb||500;return function(_0x3237xc){_0x3237xa[_0x8eb2[12]](_0x3237xb)[_0x8eb2[11]](_0x3237xc)}}function responseWithResult(_0x3237xa,_0x3237xb){_0x3237xb=_0x3237xb||200;return function(_0x3237xe){if(_0x3237xe){_0x3237xa[_0x8eb2[12]](_0x3237xb)[_0x8eb2[13]](_0x3237xe)}}}function responseWithoutResult(_0x3237xa,_0x3237xb){_0x3237xb=_0x3237xb||204;return function(){_0x3237xa[_0x8eb2[14]](_0x3237xb)}}function handleEntityNotFound(_0x3237xa){return function(_0x3237xe){if(!_0x3237xe){_0x3237xa[_0x8eb2[12]](404)[_0x8eb2[15]]();return null};return _0x3237xe}}function saveUpdates(_0x3237x12){return function(_0x3237xe){return _0x3237xe[_0x8eb2[17]](_0x3237x12)[_0x8eb2[16]](function(_0x3237x13){return _0x3237x13})}}function removeEntity(_0x3237xa){return function(_0x3237xe){if(_0x3237xe){return _0x3237xe[_0x8eb2[18]]()[_0x8eb2[16]](function(){_0x3237xa[_0x8eb2[12]](204)[_0x8eb2[15]]()})}}}function getSmsQueues(_0x3237x16){return function(){switch(_0x3237x16[_0x8eb2[27]]){case _0x8eb2[26]:return User[_0x8eb2[25]](_0x3237x16[_0x8eb2[19]],{attributes:[_0x8eb2[19]]})[_0x8eb2[16]](Util[_0x8eb2[24]]({},{attributes:[_0x8eb2[19]],include:[{raw:true,model:User,attributes:[_0x8eb2[19]]}]}))[_0x8eb2[16]](function(_0x3237x17){var _0x3237x18=[];_0x3237x17[_0x8eb2[23]][_0x8eb2[22]](function(_0x3237x19){_0x3237x18=_[_0x8eb2[21]](_0x3237x18,_[_0x8eb2[20]](_0x3237x19.Users,_0x8eb2[19]))});return {where:{$or:{queue:_[_0x8eb2[20]](_0x3237x17[_0x8eb2[23]],_0x8eb2[19]),memberid:_0x3237x18}}}});default:return {}}}}exports[_0x8eb2[28]]=function(_0x3237x1a,_0x3237xa){return Promise[_0x8eb2[35]]([])[_0x8eb2[16]](getSmsQueues(_0x3237x1a[_0x8eb2[26]]))[_0x8eb2[16]](function(_0x3237x1c){return SmsRoom[_0x8eb2[34]](_[_0x8eb2[33]]({where:{status:_0x8eb2[30],createdAt:{$gte:moment()[_0x8eb2[32]](_0x8eb2[31])}}},_0x3237x1c))})[_0x8eb2[16]](function(_0x3237x1b){return _0x3237xa[_0x8eb2[12]](200)[_0x8eb2[11]]({value:_0x3237x1b})})[_0x8eb2[29]](handleError(_0x3237xa))};exports[_0x8eb2[36]]=function(_0x3237x1a,_0x3237xa){return Promise[_0x8eb2[35]]([])[_0x8eb2[16]](getSmsQueues(_0x3237x1a[_0x8eb2[26]]))[_0x8eb2[16]](function(_0x3237x1c){return SmsRoom[_0x8eb2[34]](_[_0x8eb2[33]]({where:{status:_0x8eb2[37],createdAt:{$gte:moment()[_0x8eb2[32]](_0x8eb2[31])}}},_0x3237x1c))})[_0x8eb2[16]](function(_0x3237x1b){return _0x3237xa[_0x8eb2[12]](200)[_0x8eb2[11]]({value:_0x3237x1b})})[_0x8eb2[29]](handleError(_0x3237xa))};exports[_0x8eb2[38]]=function(_0x3237x1a,_0x3237xa){return Promise[_0x8eb2[35]]([])[_0x8eb2[16]](getSmsQueues(_0x3237x1a[_0x8eb2[26]]))[_0x8eb2[16]](function(_0x3237x1c){return SmsRoom[_0x8eb2[34]](_[_0x8eb2[33]]({where:{status:_0x8eb2[39],createdAt:{$gte:moment()[_0x8eb2[32]](_0x8eb2[31])}}},_0x3237x1c))})[_0x8eb2[16]](function(_0x3237x1b){return _0x3237xa[_0x8eb2[12]](200)[_0x8eb2[11]]({value:_0x3237x1b})})[_0x8eb2[29]](handleError(_0x3237xa))};exports[_0x8eb2[40]]=function(_0x3237x1a,_0x3237xa){return Promise[_0x8eb2[35]]([])[_0x8eb2[16]](getSmsQueues(_0x3237x1a[_0x8eb2[26]]))[_0x8eb2[16]](function(_0x3237x1c){return SmsRoom[_0x8eb2[34]](_[_0x8eb2[33]]({where:{status:_0x8eb2[41],createdAt:{$gte:moment()[_0x8eb2[32]](_0x8eb2[31])}}},_0x3237x1c))})[_0x8eb2[16]](function(_0x3237x1b){return _0x3237xa[_0x8eb2[12]](200)[_0x8eb2[11]]({value:_0x3237x1b})})[_0x8eb2[29]](handleError(_0x3237xa))};exports[_0x8eb2[42]]=function(_0x3237x1a,_0x3237xa,_0x3237x1d){return ReportSmsRoom[_0x8eb2[45]](Util[_0x8eb2[44]](_0x3237x1a[_0x8eb2[43]]))[_0x8eb2[16]](function(_0x3237x1e){return _0x3237xa[_0x8eb2[12]](200)[_0x8eb2[11]](_0x3237x1e)})[_0x8eb2[29]](handleError(_0x3237xa))};exports[_0x8eb2[46]]=function(_0x3237x1a,_0x3237xa){return ReportSmsRoomHistory[_0x8eb2[46]]()[_0x8eb2[16]](responseWithResult(_0x3237xa))[_0x8eb2[29]](handleError(_0x3237xa))}
\ No newline at end of file