Built motion from commit 2438401.|1.0.5
[motion.git] / server / api / report_fax_session / report_fax_session.controller.js
index ce93ec4..23ee2dc 100644 (file)
@@ -1 +1 @@
-var _0xbbf7=["\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\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x55\x73\x65\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","\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","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x75\x73\x65\x72","\x61\x6C\x6C","\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65"];_0xbbf7[0];var _=require(_0xbbf7[1]);var Util=require(_0xbbf7[2]);var ReportFaxSession=require(_0xbbf7[4])[_0xbbf7[3]];var ReportFaxSessionHistory=require(_0xbbf7[4])[_0xbbf7[6]][_0xbbf7[5]];var User=require(_0xbbf7[4])[_0xbbf7[7]];function handleError(_0xb77dx7,_0xb77dx8){_0xb77dx8= _0xb77dx8|| 500;return function(_0xb77dx9){_0xb77dx7[_0xbbf7[9]](_0xb77dx8)[_0xbbf7[8]](_0xb77dx9)}}function responseWithResult(_0xb77dx7,_0xb77dx8){_0xb77dx8= _0xb77dx8|| 200;return function(_0xb77dxb){if(_0xb77dxb){_0xb77dx7[_0xbbf7[9]](_0xb77dx8)[_0xbbf7[10]](_0xb77dxb)}}}function responseWithoutResult(_0xb77dx7,_0xb77dx8){_0xb77dx8= _0xb77dx8|| 204;return function(){_0xb77dx7[_0xbbf7[11]](_0xb77dx8)}}function handleEntityNotFound(_0xb77dx7){return function(_0xb77dxb){if(!_0xb77dxb){_0xb77dx7[_0xbbf7[9]](404)[_0xbbf7[12]]();return null};return _0xb77dxb}}function saveUpdates(_0xb77dxf){return function(_0xb77dxb){return _0xb77dxb[_0xbbf7[14]](_0xb77dxf)[_0xbbf7[13]](function(_0xb77dx10){return _0xb77dx10})}}function removeEntity(_0xb77dx7){return function(_0xb77dxb){if(_0xb77dxb){return _0xb77dxb[_0xbbf7[15]]()[_0xbbf7[13]](function(){_0xb77dx7[_0xbbf7[9]](204)[_0xbbf7[12]]()})}}}exports[_0xbbf7[16]]= function(_0xb77dx12,_0xb77dx7){return ReportFaxSession[_0xbbf7[20]](Util[_0xbbf7[19]](_0xb77dx12[_0xbbf7[18]]))[_0xbbf7[13]](responseWithResult(_0xb77dx7))[_0xbbf7[17]](handleError(_0xb77dx7))};exports[_0xbbf7[21]]= function(_0xb77dx12,_0xb77dx7){return ReportFaxSession[_0xbbf7[24]](_0xb77dx12[_0xbbf7[23]][_0xbbf7[22]])[_0xbbf7[13]](handleEntityNotFound(_0xb77dx7))[_0xbbf7[13]](responseWithResult(_0xb77dx7))[_0xbbf7[17]](handleError(_0xb77dx7))};exports[_0xbbf7[25]]= function(_0xb77dx12,_0xb77dx7){return ReportFaxSession[_0xbbf7[25]](_0xb77dx12[_0xbbf7[26]])[_0xbbf7[13]](responseWithResult(_0xb77dx7,201))[_0xbbf7[17]](handleError(_0xb77dx7))};exports[_0xbbf7[27]]= function(_0xb77dx12,_0xb77dx7){if(_0xb77dx12[_0xbbf7[26]][_0xbbf7[22]]){delete _0xb77dx12[_0xbbf7[26]][_0xbbf7[22]]};return ReportFaxSession[_0xbbf7[24]](_0xb77dx12[_0xbbf7[23]][_0xbbf7[22]])[_0xbbf7[13]](handleEntityNotFound(_0xb77dx7))[_0xbbf7[13]](saveUpdates(_0xb77dx12[_0xbbf7[26]]))[_0xbbf7[13]](responseWithResult(_0xb77dx7))[_0xbbf7[17]](handleError(_0xb77dx7))};exports[_0xbbf7[15]]= function(_0xb77dx12,_0xb77dx7){return ReportFaxSession[_0xbbf7[24]](_0xb77dx12[_0xbbf7[23]][_0xbbf7[22]])[_0xbbf7[13]](handleEntityNotFound(_0xb77dx7))[_0xbbf7[13]](removeEntity(_0xb77dx7))[_0xbbf7[17]](handleError(_0xb77dx7))};exports[_0xbbf7[28]]= function(_0xb77dx12,_0xb77dx7){return ReportFaxSessionHistory[_0xbbf7[28]]()[_0xbbf7[13]](function(_0xb77dx13){return _0xb77dx7[_0xbbf7[9]](200)[_0xbbf7[8]](_0xb77dx13)})[_0xbbf7[17]](handleError(_0xb77dx7))};exports[_0xbbf7[29]]= function(_0xb77dx12,_0xb77dx7){return Promise[_0xbbf7[34]]([])[_0xbbf7[13]](getFaxQueues(_0xb77dx12[_0xbbf7[33]]))[_0xbbf7[13]](function(_0xb77dx15){return ReportFaxSession[_0xbbf7[32]](Util[_0xbbf7[19]](_0xb77dx12[_0xbbf7[18]],_[_0xbbf7[31]]({timeout:true},_0xb77dx15)))})[_0xbbf7[13]](function(_0xb77dx14){return _0xb77dx7[_0xbbf7[9]](200)[_0xbbf7[8]]({value:_0xb77dx14})})[_0xbbf7[17]](function(_0xb77dx9){console[_0xbbf7[30]](_0xb77dx9);return handleError(_0xb77dx7,_0xb77dx9)})};exports[_0xbbf7[35]]= function(_0xb77dx12,_0xb77dx7){return Promise[_0xbbf7[34]]([])[_0xbbf7[13]](getFaxQueues(_0xb77dx12[_0xbbf7[33]]))[_0xbbf7[13]](function(_0xb77dx15){return ReportFaxSession[_0xbbf7[32]](Util[_0xbbf7[19]](_0xb77dx12[_0xbbf7[18]],_[_0xbbf7[31]]({leaveAt:null},_0xb77dx15)))})[_0xbbf7[13]](function(_0xb77dx14){return _0xb77dx7[_0xbbf7[9]](200)[_0xbbf7[8]]({value:_0xb77dx14})})[_0xbbf7[17]](function(_0xb77dx9){console[_0xbbf7[30]](_0xb77dx9);return handleError(_0xb77dx7,_0xb77dx9)})};exports[_0xbbf7[36]]= function(_0xb77dx12,_0xb77dx7){return Promise[_0xbbf7[34]]([])[_0xbbf7[13]](getFaxQueues(_0xb77dx12[_0xbbf7[33]]))[_0xbbf7[13]](function(_0xb77dx15){return ReportFaxSession[_0xbbf7[20]](Util[_0xbbf7[19]](_0xb77dx12[_0xbbf7[18]],_[_0xbbf7[31]]({leaveAt:null},_0xb77dx15)))})[_0xbbf7[13]](function(_0xb77dx14){return _0xb77dx7[_0xbbf7[9]](200)[_0xbbf7[8]]({rows:_0xb77dx14})})[_0xbbf7[17]](handleError(_0xb77dx7))};function getFaxQueues(_0xb77dx17){return function(){switch(_0xb77dx17[_0xbbf7[44]]){case _0xbbf7[33]:return User[_0xbbf7[24]](_0xb77dx17[_0xbbf7[22]],{attributes:[_0xbbf7[22]]})[_0xbbf7[13]](Util[_0xbbf7[41]]({},{attributes:[_0xbbf7[22]],include:[{raw:true,model:User,attributes:[_0xbbf7[22]]}]}))[_0xbbf7[13]](function(_0xb77dx18){var _0xb77dx19=[];_0xb77dx18[_0xbbf7[40]][_0xbbf7[39]](function(_0xb77dx1a){_0xb77dx19= _[_0xbbf7[38]](_0xb77dx19,_[_0xbbf7[37]](_0xb77dx1a.Users,_0xbbf7[22]))});return {$or:{queue:_[_0xbbf7[37]](_0xb77dx18[_0xbbf7[40]],_0xbbf7[22]),memberid:_0xb77dx19}}});case _0xbbf7[43]:return User[_0xbbf7[24]](_0xb77dx17[_0xbbf7[22]],{attributes:[_0xbbf7[22]]})[_0xbbf7[13]](function(_0xb77dx1b){return _0xb77dx1b[_0xbbf7[42]]({attributes:[_0xbbf7[22]]})})[_0xbbf7[13]](function(_0xb77dx18){return {$or:{queue:_[_0xbbf7[37]](_0xb77dx18,_0xbbf7[22]),memberid:_0xb77dx17[_0xbbf7[22]]}}});default:return {}}}}
\ No newline at end of file
+var _0x9922=["\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\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x55\x73\x65\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","\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","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x75\x73\x65\x72","\x61\x6C\x6C","\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65"];_0x9922[0];var _=require(_0x9922[1]);var Util=require(_0x9922[2]);var ReportFaxSession=require(_0x9922[4])[_0x9922[3]];var ReportFaxSessionHistory=require(_0x9922[4])[_0x9922[6]][_0x9922[5]];var User=require(_0x9922[4])[_0x9922[7]];function handleError(_0x7b30x7,_0x7b30x8){_0x7b30x8= _0x7b30x8|| 500;return function(_0x7b30x9){_0x7b30x7[_0x9922[9]](_0x7b30x8)[_0x9922[8]](_0x7b30x9)}}function responseWithResult(_0x7b30x7,_0x7b30x8){_0x7b30x8= _0x7b30x8|| 200;return function(_0x7b30xb){if(_0x7b30xb){_0x7b30x7[_0x9922[9]](_0x7b30x8)[_0x9922[10]](_0x7b30xb)}}}function responseWithoutResult(_0x7b30x7,_0x7b30x8){_0x7b30x8= _0x7b30x8|| 204;return function(){_0x7b30x7[_0x9922[11]](_0x7b30x8)}}function handleEntityNotFound(_0x7b30x7){return function(_0x7b30xb){if(!_0x7b30xb){_0x7b30x7[_0x9922[9]](404)[_0x9922[12]]();return null};return _0x7b30xb}}function saveUpdates(_0x7b30xf){return function(_0x7b30xb){return _0x7b30xb[_0x9922[14]](_0x7b30xf)[_0x9922[13]](function(_0x7b30x10){return _0x7b30x10})}}function removeEntity(_0x7b30x7){return function(_0x7b30xb){if(_0x7b30xb){return _0x7b30xb[_0x9922[15]]()[_0x9922[13]](function(){_0x7b30x7[_0x9922[9]](204)[_0x9922[12]]()})}}}exports[_0x9922[16]]= function(_0x7b30x12,_0x7b30x7){return ReportFaxSession[_0x9922[20]](Util[_0x9922[19]](_0x7b30x12[_0x9922[18]]))[_0x9922[13]](responseWithResult(_0x7b30x7))[_0x9922[17]](handleError(_0x7b30x7))};exports[_0x9922[21]]= function(_0x7b30x12,_0x7b30x7){return ReportFaxSession[_0x9922[24]](_0x7b30x12[_0x9922[23]][_0x9922[22]])[_0x9922[13]](handleEntityNotFound(_0x7b30x7))[_0x9922[13]](responseWithResult(_0x7b30x7))[_0x9922[17]](handleError(_0x7b30x7))};exports[_0x9922[25]]= function(_0x7b30x12,_0x7b30x7){return ReportFaxSession[_0x9922[25]](_0x7b30x12[_0x9922[26]])[_0x9922[13]](responseWithResult(_0x7b30x7,201))[_0x9922[17]](handleError(_0x7b30x7))};exports[_0x9922[27]]= function(_0x7b30x12,_0x7b30x7){if(_0x7b30x12[_0x9922[26]][_0x9922[22]]){delete _0x7b30x12[_0x9922[26]][_0x9922[22]]};return ReportFaxSession[_0x9922[24]](_0x7b30x12[_0x9922[23]][_0x9922[22]])[_0x9922[13]](handleEntityNotFound(_0x7b30x7))[_0x9922[13]](saveUpdates(_0x7b30x12[_0x9922[26]]))[_0x9922[13]](responseWithResult(_0x7b30x7))[_0x9922[17]](handleError(_0x7b30x7))};exports[_0x9922[15]]= function(_0x7b30x12,_0x7b30x7){return ReportFaxSession[_0x9922[24]](_0x7b30x12[_0x9922[23]][_0x9922[22]])[_0x9922[13]](handleEntityNotFound(_0x7b30x7))[_0x9922[13]](removeEntity(_0x7b30x7))[_0x9922[17]](handleError(_0x7b30x7))};exports[_0x9922[28]]= function(_0x7b30x12,_0x7b30x7){return ReportFaxSessionHistory[_0x9922[28]]()[_0x9922[13]](function(_0x7b30x13){return _0x7b30x7[_0x9922[9]](200)[_0x9922[8]](_0x7b30x13)})[_0x9922[17]](handleError(_0x7b30x7))};exports[_0x9922[29]]= function(_0x7b30x12,_0x7b30x7){return Promise[_0x9922[34]]([])[_0x9922[13]](getFaxQueues(_0x7b30x12[_0x9922[33]]))[_0x9922[13]](function(_0x7b30x15){return ReportFaxSession[_0x9922[32]](Util[_0x9922[19]](_0x7b30x12[_0x9922[18]],_[_0x9922[31]]({timeout:true},_0x7b30x15)))})[_0x9922[13]](function(_0x7b30x14){return _0x7b30x7[_0x9922[9]](200)[_0x9922[8]]({value:_0x7b30x14})})[_0x9922[17]](function(_0x7b30x9){console[_0x9922[30]](_0x7b30x9);return handleError(_0x7b30x7,_0x7b30x9)})};exports[_0x9922[35]]= function(_0x7b30x12,_0x7b30x7){return Promise[_0x9922[34]]([])[_0x9922[13]](getFaxQueues(_0x7b30x12[_0x9922[33]]))[_0x9922[13]](function(_0x7b30x15){return ReportFaxSession[_0x9922[32]](Util[_0x9922[19]](_0x7b30x12[_0x9922[18]],_[_0x9922[31]]({leaveAt:null},_0x7b30x15)))})[_0x9922[13]](function(_0x7b30x14){return _0x7b30x7[_0x9922[9]](200)[_0x9922[8]]({value:_0x7b30x14})})[_0x9922[17]](function(_0x7b30x9){console[_0x9922[30]](_0x7b30x9);return handleError(_0x7b30x7,_0x7b30x9)})};exports[_0x9922[36]]= function(_0x7b30x12,_0x7b30x7){return Promise[_0x9922[34]]([])[_0x9922[13]](getFaxQueues(_0x7b30x12[_0x9922[33]]))[_0x9922[13]](function(_0x7b30x15){return ReportFaxSession[_0x9922[20]](Util[_0x9922[19]](_0x7b30x12[_0x9922[18]],_[_0x9922[31]]({leaveAt:null},_0x7b30x15)))})[_0x9922[13]](function(_0x7b30x14){return _0x7b30x7[_0x9922[9]](200)[_0x9922[8]]({rows:_0x7b30x14})})[_0x9922[17]](handleError(_0x7b30x7))};function getFaxQueues(_0x7b30x17){return function(){switch(_0x7b30x17[_0x9922[44]]){case _0x9922[33]:return User[_0x9922[24]](_0x7b30x17[_0x9922[22]],{attributes:[_0x9922[22]]})[_0x9922[13]](Util[_0x9922[41]]({},{attributes:[_0x9922[22]],include:[{raw:true,model:User,attributes:[_0x9922[22]]}]}))[_0x9922[13]](function(_0x7b30x18){var _0x7b30x19=[];_0x7b30x18[_0x9922[40]][_0x9922[39]](function(_0x7b30x1a){_0x7b30x19= _[_0x9922[38]](_0x7b30x19,_[_0x9922[37]](_0x7b30x1a.Users,_0x9922[22]))});return {$or:{queue:_[_0x9922[37]](_0x7b30x18[_0x9922[40]],_0x9922[22]),memberid:_0x7b30x19}}});case _0x9922[43]:return User[_0x9922[24]](_0x7b30x17[_0x9922[22]],{attributes:[_0x9922[22]]})[_0x9922[13]](function(_0x7b30x1b){return _0x7b30x1b[_0x9922[42]]({attributes:[_0x9922[22]]})})[_0x9922[13]](function(_0x7b30x18){return {$or:{queue:_[_0x9922[37]](_0x7b30x18,_0x9922[22]),memberid:_0x7b30x17[_0x9922[22]]}}});default:return {}}}}
\ No newline at end of file