Built motion from commit f1f5024.|1.0.16
[motion.git] / server / api / report_chat_session / report_chat_session.controller.js
index 033f371..b3b53dc 100644 (file)
@@ -1 +1 @@
-var _0xc15c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\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","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x43\x68\x61\x74\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","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x6C\x6C"];_0xc15c[0];var _=require(_0xc15c[1]);var ReportChatSession=require(_0xc15c[3])[_0xc15c[2]];var User=require(_0xc15c[3])[_0xc15c[4]];var ReportChatSessionHistory=require(_0xc15c[3])[_0xc15c[6]][_0xc15c[5]];var Promise=require(_0xc15c[7]);var Util=require(_0xc15c[8]);exports[_0xc15c[9]]= function(_0x4a89x7,_0x4a89x8,_0x4a89x9){return ReportChatSession[_0xc15c[16]](Util[_0xc15c[15]](_0x4a89x7[_0xc15c[14]]))[_0xc15c[13]](function(_0x4a89xb){_0x4a89x8[_0xc15c[12]](200)[_0xc15c[11]](_0x4a89xb)})[_0xc15c[10]](function(_0x4a89xa){return handleError(_0x4a89x8,_0x4a89xa)})};exports[_0xc15c[17]]= function(_0x4a89x7,_0x4a89x8){return ReportChatSessionHistory[_0xc15c[17]]()[_0xc15c[13]](function(_0x4a89xc){return _0x4a89x8[_0xc15c[12]](200)[_0xc15c[11]](_0x4a89xc)})[_0xc15c[10]](function(_0x4a89xa){return handleError(_0x4a89x8,_0x4a89xa)})};function getChatQueues(_0x4a89xe){return function(){switch(_0x4a89xe[_0xc15c[28]]){case _0xc15c[25]:return User[_0xc15c[24]](_0x4a89xe[_0xc15c[18]],{attributes:[_0xc15c[18]]})[_0xc15c[13]](Util[_0xc15c[23]]({},{attributes:[_0xc15c[18]],include:[{raw:true,model:User,attributes:[_0xc15c[18]]}]}))[_0xc15c[13]](function(_0x4a89xf){var _0x4a89x10=[];_0x4a89xf[_0xc15c[22]][_0xc15c[21]](function(_0x4a89x11){_0x4a89x10= _[_0xc15c[20]](_0x4a89x10,_[_0xc15c[19]](_0x4a89x11.Users,_0xc15c[18]))});return {$or:{queue:_[_0xc15c[19]](_0x4a89xf[_0xc15c[22]],_0xc15c[18]),memberid:_0x4a89x10}}});case _0xc15c[27]:return User[_0xc15c[24]](_0x4a89xe[_0xc15c[18]],{attributes:[_0xc15c[18]]})[_0xc15c[13]](function(_0x4a89x12){return _0x4a89x12[_0xc15c[26]]({attributes:[_0xc15c[18]]})})[_0xc15c[13]](function(_0x4a89xf){return {$or:{queue:_[_0xc15c[19]](_0x4a89xf,_0xc15c[18]),memberid:_0x4a89xe[_0xc15c[18]]}}});default:return {}}}}exports[_0xc15c[29]]= function(_0x4a89x7,_0x4a89x8){return Promise[_0xc15c[33]]([])[_0xc15c[13]](getChatQueues(_0x4a89x7[_0xc15c[25]]))[_0xc15c[13]](function(_0x4a89x14){return ReportChatSession[_0xc15c[32]](Util[_0xc15c[15]](_0x4a89x7[_0xc15c[14]],_[_0xc15c[31]]({leaveAt:null},_0x4a89x14)))})[_0xc15c[13]](function(_0x4a89x13){return _0x4a89x8[_0xc15c[12]](200)[_0xc15c[11]]({rows:_0x4a89x13})})[_0xc15c[10]](function(_0x4a89xa){console[_0xc15c[30]](_0x4a89xa);return handleError(_0x4a89x8,_0x4a89xa)})};function handleError(_0x4a89x8,_0x4a89xa){return _0x4a89x8[_0xc15c[12]](500)[_0xc15c[11]](_0x4a89xa)}
\ No newline at end of file
+var _0x5897=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\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","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x43\x68\x61\x74\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","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x6C\x6C","\x6F\x70\x65\x6E","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x63\x6F\x75\x6E\x74","\x77\x61\x69\x74\x69\x6E\x67","\x63\x6C\x6F\x73\x65\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64"];_0x5897[0];var _=require(_0x5897[1]);var ReportChatSession=require(_0x5897[3])[_0x5897[2]];var User=require(_0x5897[3])[_0x5897[4]];var ReportChatSessionHistory=require(_0x5897[3])[_0x5897[6]][_0x5897[5]];var Promise=require(_0x5897[7]);var Util=require(_0x5897[8]);var moment=require(_0x5897[9]);exports[_0x5897[10]]= function(_0xb854x8,_0xb854x9,_0xb854xa){return ReportChatSession[_0x5897[17]](Util[_0x5897[16]](_0xb854x8[_0x5897[15]]))[_0x5897[14]](function(_0xb854xc){_0xb854x9[_0x5897[13]](200)[_0x5897[12]](_0xb854xc)})[_0x5897[11]](function(_0xb854xb){return handleError(_0xb854x9,_0xb854xb)})};exports[_0x5897[18]]= function(_0xb854x8,_0xb854x9){return ReportChatSessionHistory[_0x5897[18]]()[_0x5897[14]](function(_0xb854xd){return _0xb854x9[_0x5897[13]](200)[_0x5897[12]](_0xb854xd)})[_0x5897[11]](function(_0xb854xb){return handleError(_0xb854x9,_0xb854xb)})};function getChatQueues(_0xb854xf){return function(){switch(_0xb854xf[_0x5897[29]]){case _0x5897[26]:return User[_0x5897[25]](_0xb854xf[_0x5897[19]],{attributes:[_0x5897[19]]})[_0x5897[14]](Util[_0x5897[24]]({},{attributes:[_0x5897[19]],include:[{raw:true,model:User,attributes:[_0x5897[19]]}]}))[_0x5897[14]](function(_0xb854x10){var _0xb854x11=[];_0xb854x10[_0x5897[23]][_0x5897[22]](function(_0xb854x12){_0xb854x11= _[_0x5897[21]](_0xb854x11,_[_0x5897[20]](_0xb854x12.Users,_0x5897[19]))});return {$or:{queue:_[_0x5897[20]](_0xb854x10[_0x5897[23]],_0x5897[19]),memberid:_0xb854x11}}});case _0x5897[28]:return User[_0x5897[25]](_0xb854xf[_0x5897[19]],{attributes:[_0x5897[19]]})[_0x5897[14]](function(_0xb854x13){return _0xb854x13[_0x5897[27]]({attributes:[_0x5897[19]]})})[_0x5897[14]](function(_0xb854x10){return {$or:{queue:_[_0x5897[20]](_0xb854x10,_0x5897[19]),memberid:_0xb854xf[_0x5897[19]]}}});default:return {}}}}exports[_0x5897[30]]= function(_0xb854x8,_0xb854x9){return Promise[_0x5897[34]]([])[_0x5897[14]](getChatQueues(_0xb854x8[_0x5897[26]]))[_0x5897[14]](function(_0xb854x15){return ReportChatSession[_0x5897[33]](Util[_0x5897[16]](_0xb854x8[_0x5897[15]],_[_0x5897[32]]({leaveAt:null},_0xb854x15)))})[_0x5897[14]](function(_0xb854x14){return _0xb854x9[_0x5897[13]](200)[_0x5897[12]]({rows:_0xb854x14})})[_0x5897[11]](function(_0xb854xb){console[_0x5897[31]](_0xb854xb);return handleError(_0xb854x9,_0xb854xb)})};exports[_0x5897[35]]= function(_0xb854x8,_0xb854x9){return Promise[_0x5897[34]]([])[_0x5897[14]](getChatQueues(_0xb854x8[_0x5897[26]]))[_0x5897[14]](function(_0xb854x15){return ReportChatSession[_0x5897[38]](Util[_0x5897[16]](_0xb854x8[_0x5897[15]],_[_0x5897[32]]({leaveAt:{$ne:null},complete:null,abandon:null,timeout:null,createdAt:{$gte:moment()[_0x5897[37]](_0x5897[36])}},_0xb854x15)))})[_0x5897[14]](function(_0xb854x14){return _0xb854x9[_0x5897[13]](200)[_0x5897[12]]({value:_0xb854x14})})[_0x5897[11]](function(_0xb854xb){console[_0x5897[31]](_0xb854xb);return handleError(_0xb854x9,_0xb854xb)})};exports[_0x5897[39]]= function(_0xb854x8,_0xb854x9){return Promise[_0x5897[34]]([])[_0x5897[14]](getChatQueues(_0xb854x8[_0x5897[26]]))[_0x5897[14]](function(_0xb854x15){return ReportChatSession[_0x5897[38]](Util[_0x5897[16]](_0xb854x8[_0x5897[15]],_[_0x5897[32]]({leaveAt:null,createdAt:{$gte:moment()[_0x5897[37]](_0x5897[36])}},_0xb854x15)))})[_0x5897[14]](function(_0xb854x14){return _0xb854x9[_0x5897[13]](200)[_0x5897[12]]({value:_0xb854x14})})[_0x5897[11]](function(_0xb854xb){console[_0x5897[31]](_0xb854xb);return handleError(_0xb854x9,_0xb854xb)})};exports[_0x5897[40]]= function(_0xb854x8,_0xb854x9){return Promise[_0x5897[34]]([])[_0x5897[14]](getChatQueues(_0xb854x8[_0x5897[26]]))[_0x5897[14]](function(_0xb854x15){return ReportChatSession[_0x5897[38]](Util[_0x5897[16]](_0xb854x8[_0x5897[15]],_[_0x5897[32]]({complete:true,createdAt:{$gte:moment()[_0x5897[37]](_0x5897[36])}},_0xb854x15)))})[_0x5897[14]](function(_0xb854x14){return _0xb854x9[_0x5897[13]](200)[_0x5897[12]]({value:_0xb854x14})})[_0x5897[11]](function(_0xb854xb){console[_0x5897[31]](_0xb854xb);return handleError(_0xb854x9,_0xb854xb)})};exports[_0x5897[41]]= function(_0xb854x8,_0xb854x9){return Promise[_0x5897[34]]([])[_0x5897[14]](getChatQueues(_0xb854x8[_0x5897[26]]))[_0x5897[14]](function(_0xb854x15){return ReportChatSession[_0x5897[38]](Util[_0x5897[16]](_0xb854x8[_0x5897[15]],_[_0x5897[32]]({timeout:true,createdAt:{$gte:moment()[_0x5897[37]](_0x5897[36])}},_0xb854x15)))})[_0x5897[14]](function(_0xb854x14){return _0xb854x9[_0x5897[13]](200)[_0x5897[12]]({value:_0xb854x14})})[_0x5897[11]](function(_0xb854xb){console[_0x5897[31]](_0xb854xb);return handleError(_0xb854x9,_0xb854xb)})};exports[_0x5897[42]]= function(_0xb854x8,_0xb854x9){return Promise[_0x5897[34]]([])[_0x5897[14]](getChatQueues(_0xb854x8[_0x5897[26]]))[_0x5897[14]](function(_0xb854x15){return ReportChatSession[_0x5897[38]](Util[_0x5897[16]](_0xb854x8[_0x5897[15]],_[_0x5897[32]]({abandon:true,createdAt:{$gte:moment()[_0x5897[37]](_0x5897[36])}},_0xb854x15)))})[_0x5897[14]](function(_0xb854x14){return _0xb854x9[_0x5897[13]](200)[_0x5897[12]]({value:_0xb854x14})})[_0x5897[11]](function(_0xb854xb){console[_0x5897[31]](_0xb854xb);return handleError(_0xb854x9,_0xb854xb)})};function handleError(_0xb854x9,_0xb854xb){return _0xb854x9[_0x5897[13]](500)[_0x5897[12]](_0xb854xb)}
\ No newline at end of file