Built motion from commit 4e0bcdd.|0.0.104
[motion.git] / server / api / report_chat_room / report_chat_room.controller.js
index 8678281..a1b9ff1 100644 (file)
@@ -1 +1 @@
-var _0xe971=["\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\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\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\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\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","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xe971[0];var _=require(_0xe971[1]);var Util=require(_0xe971[2]);var ReportChatRoom=require(_0xe971[4])[_0xe971[3]];var ReportChatRoomHistory=require(_0xe971[4])[_0xe971[6]][_0xe971[5]];function handleError(_0xc891x6,_0xc891x7){_0xc891x7=_0xc891x7||500;return function(_0xc891x8){_0xc891x6[_0xe971[8]](_0xc891x7)[_0xe971[7]](_0xc891x8)}}function responseWithResult(_0xc891x6,_0xc891x7){_0xc891x7=_0xc891x7||200;return function(_0xc891xa){if(_0xc891xa){_0xc891x6[_0xe971[8]](_0xc891x7)[_0xe971[9]](_0xc891xa)}}}function responseWithoutResult(_0xc891x6,_0xc891x7){_0xc891x7=_0xc891x7||204;return function(){_0xc891x6[_0xe971[10]](_0xc891x7)}}function handleEntityNotFound(_0xc891x6){return function(_0xc891xa){if(!_0xc891xa){_0xc891x6[_0xe971[8]](404)[_0xe971[11]]();return null};return _0xc891xa}}function saveUpdates(_0xc891xe){return function(_0xc891xa){return _0xc891xa[_0xe971[13]](_0xc891xe)[_0xe971[12]](function(_0xc891xf){return _0xc891xf})}}function removeEntity(_0xc891x6){return function(_0xc891xa){if(_0xc891xa){return _0xc891xa[_0xe971[14]]()[_0xe971[12]](function(){_0xc891x6[_0xe971[8]](204)[_0xe971[11]]()})}}}exports[_0xe971[15]]=function(_0xc891x11,_0xc891x6){return ReportChatRoom[_0xe971[19]](Util[_0xe971[18]](_0xc891x11[_0xe971[17]]))[_0xe971[12]](responseWithResult(_0xc891x6))[_0xe971[16]](handleError(_0xc891x6))};exports[_0xe971[20]]=function(_0xc891x11,_0xc891x6){return ReportChatRoom[_0xe971[23]](_0xc891x11[_0xe971[22]][_0xe971[21]])[_0xe971[12]](handleEntityNotFound(_0xc891x6))[_0xe971[12]](responseWithResult(_0xc891x6))[_0xe971[16]](handleError(_0xc891x6))};exports[_0xe971[24]]=function(_0xc891x11,_0xc891x6){return ReportChatRoom[_0xe971[24]](_0xc891x11[_0xe971[25]])[_0xe971[12]](responseWithResult(_0xc891x6,201))[_0xe971[16]](handleError(_0xc891x6))};exports[_0xe971[26]]=function(_0xc891x11,_0xc891x6){if(_0xc891x11[_0xe971[25]][_0xe971[21]]){delete _0xc891x11[_0xe971[25]][_0xe971[21]]};return ReportChatRoom[_0xe971[23]](_0xc891x11[_0xe971[22]][_0xe971[21]])[_0xe971[12]](handleEntityNotFound(_0xc891x6))[_0xe971[12]](saveUpdates(_0xc891x11[_0xe971[25]]))[_0xe971[12]](responseWithResult(_0xc891x6))[_0xe971[16]](handleError(_0xc891x6))};exports[_0xe971[14]]=function(_0xc891x11,_0xc891x6){return ReportChatRoom[_0xe971[23]](_0xc891x11[_0xe971[22]][_0xe971[21]])[_0xe971[12]](handleEntityNotFound(_0xc891x6))[_0xe971[12]](removeEntity(_0xc891x6))[_0xe971[16]](handleError(_0xc891x6))};exports[_0xe971[27]]=function(_0xc891x11,_0xc891x6){return ReportChatRoomHistory[_0xe971[27]]()[_0xe971[12]](responseWithResult(_0xc891x6))[_0xe971[16]](handleError(_0xc891x6))}
\ No newline at end of file
+var _0xf1a7=["\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\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x55\x73\x65\x72","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x6C\x6F\x67","\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\x4D\x61\x69\x6C\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","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x41\x42\x41\x4E\x44\x4F\x4E","\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"];_0xf1a7[0];var _=require(_0xf1a7[1]);var Util=require(_0xf1a7[2]);var ReportChatRoom=require(_0xf1a7[4])[_0xf1a7[3]];var ReportChatRoomHistory=require(_0xf1a7[4])[_0xf1a7[6]][_0xf1a7[5]];var User=require(_0xf1a7[4])[_0xf1a7[7]];var ChatQueue=require(_0xf1a7[4])[_0xf1a7[8]];function handleError(_0x25b7x8,_0x25b7x9){_0x25b7x9=_0x25b7x9||500;return function(_0x25b7xa){console[_0xf1a7[9]](_0x25b7xa);_0x25b7x8[_0xf1a7[11]](_0x25b7x9)[_0xf1a7[10]](_0x25b7xa)}}function responseWithResult(_0x25b7x8,_0x25b7x9){_0x25b7x9=_0x25b7x9||200;return function(_0x25b7xc){if(_0x25b7xc){_0x25b7x8[_0xf1a7[11]](_0x25b7x9)[_0xf1a7[12]](_0x25b7xc)}}}function responseWithoutResult(_0x25b7x8,_0x25b7x9){_0x25b7x9=_0x25b7x9||204;return function(){_0x25b7x8[_0xf1a7[13]](_0x25b7x9)}}function handleEntityNotFound(_0x25b7x8){return function(_0x25b7xc){if(!_0x25b7xc){_0x25b7x8[_0xf1a7[11]](404)[_0xf1a7[14]]();return null};return _0x25b7xc}}function saveUpdates(_0x25b7x10){return function(_0x25b7xc){return _0x25b7xc[_0xf1a7[16]](_0x25b7x10)[_0xf1a7[15]](function(_0x25b7x11){return _0x25b7x11})}}function removeEntity(_0x25b7x8){return function(_0x25b7xc){if(_0x25b7xc){return _0x25b7xc[_0xf1a7[17]]()[_0xf1a7[15]](function(){_0x25b7x8[_0xf1a7[11]](204)[_0xf1a7[14]]()})}}}function getChatQueues(_0x25b7x14){return function(){switch(_0x25b7x14[_0xf1a7[26]]){case _0xf1a7[25]:return User[_0xf1a7[24]](_0x25b7x14[_0xf1a7[18]],{attributes:[_0xf1a7[18]]})[_0xf1a7[15]](Util[_0xf1a7[23]]({},{attributes:[_0xf1a7[18]],include:[{raw:true,model:User,attributes:[_0xf1a7[18]]}]}))[_0xf1a7[15]](function(_0x25b7x15){var _0x25b7x16=[];_0x25b7x15[_0xf1a7[22]][_0xf1a7[21]](function(_0x25b7x17){_0x25b7x16=_[_0xf1a7[20]](_0x25b7x16,_[_0xf1a7[19]](_0x25b7x17.Users,_0xf1a7[18]))});return {where:{$or:{queueid:_[_0xf1a7[19]](_0x25b7x15[_0xf1a7[22]],_0xf1a7[18]),memberid:_0x25b7x16}}}});default:return {}}}}exports[_0xf1a7[27]]=function(_0x25b7x18,_0x25b7x8){return Promise[_0xf1a7[32]]([])[_0xf1a7[15]](getChatQueues(_0x25b7x18[_0xf1a7[25]]))[_0xf1a7[15]](function(_0x25b7x1a){return ReportChatRoom[_0xf1a7[31]](_[_0xf1a7[30]]({where:{status:_0xf1a7[29]}},_0x25b7x1a))})[_0xf1a7[15]](function(_0x25b7x19){return _0x25b7x8[_0xf1a7[11]](200)[_0xf1a7[10]]({value:_0x25b7x19})})[_0xf1a7[28]](handleError(_0x25b7x8))};exports[_0xf1a7[33]]=function(_0x25b7x18,_0x25b7x8){return Promise[_0xf1a7[32]]([])[_0xf1a7[15]](getChatQueues(_0x25b7x18[_0xf1a7[25]]))[_0xf1a7[15]](function(_0x25b7x1a){return ReportChatRoom[_0xf1a7[31]](_[_0xf1a7[30]]({where:{status:_0xf1a7[34]}},_0x25b7x1a))})[_0xf1a7[15]](function(_0x25b7x19){return _0x25b7x8[_0xf1a7[11]](200)[_0xf1a7[10]]({value:_0x25b7x19})})[_0xf1a7[28]](handleError(_0x25b7x8))};exports[_0xf1a7[35]]=function(_0x25b7x18,_0x25b7x8){return Promise[_0xf1a7[32]]([])[_0xf1a7[15]](getChatQueues(_0x25b7x18[_0xf1a7[25]]))[_0xf1a7[15]](function(_0x25b7x1a){return ReportChatRoom[_0xf1a7[31]](_[_0xf1a7[30]]({where:{status:_0xf1a7[36]}},_0x25b7x1a))})[_0xf1a7[15]](function(_0x25b7x19){return _0x25b7x8[_0xf1a7[11]](200)[_0xf1a7[10]]({value:_0x25b7x19})})[_0xf1a7[28]](handleError(_0x25b7x8))};exports[_0xf1a7[37]]=function(_0x25b7x18,_0x25b7x8){return Promise[_0xf1a7[32]]([])[_0xf1a7[15]](getChatQueues(_0x25b7x18[_0xf1a7[25]]))[_0xf1a7[15]](function(_0x25b7x1a){return ReportChatRoom[_0xf1a7[31]](_[_0xf1a7[30]]({where:{status:_0xf1a7[38]}},_0x25b7x1a))})[_0xf1a7[15]](function(_0x25b7x19){return _0x25b7x8[_0xf1a7[11]](200)[_0xf1a7[10]]({value:_0x25b7x19})})[_0xf1a7[28]](handleError(_0x25b7x8))};exports[_0xf1a7[39]]=function(_0x25b7x18,_0x25b7x8){return Promise[_0xf1a7[32]]([])[_0xf1a7[15]](getChatQueues(_0x25b7x18[_0xf1a7[25]]))[_0xf1a7[15]](function(_0x25b7x1a){return ReportChatRoom[_0xf1a7[31]](_[_0xf1a7[30]]({where:{status:_0xf1a7[40]}},_0x25b7x1a))})[_0xf1a7[15]](function(_0x25b7x19){return _0x25b7x8[_0xf1a7[11]](200)[_0xf1a7[10]]({value:_0x25b7x19})})[_0xf1a7[28]](handleError(_0x25b7x8))};exports[_0xf1a7[41]]=function(_0x25b7x18,_0x25b7x8,_0x25b7x1b){return ReportChatRoom[_0xf1a7[44]](Util[_0xf1a7[43]](_0x25b7x18[_0xf1a7[42]]))[_0xf1a7[15]](function(_0x25b7x1c){return _0x25b7x8[_0xf1a7[11]](200)[_0xf1a7[10]](_0x25b7x1c)})[_0xf1a7[28]](handleError(_0x25b7x8))};exports[_0xf1a7[45]]=function(_0x25b7x18,_0x25b7x8){return ReportChatRoomHistory[_0xf1a7[45]]()[_0xf1a7[15]](responseWithResult(_0x25b7x8))[_0xf1a7[28]](handleError(_0x25b7x8))}
\ No newline at end of file