Built motion from commit b387bb7c7.|1.0.28
[motion.git] / server / api / fax_message / fax_message.controller.js
index a3ead3f..0fbdab7 100644 (file)
@@ -1 +1 @@
-var _0x3499=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x66\x73","\x70\x61\x74\x68","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x6E\x6F\x64\x65\x2D\x75\x75\x69\x64","\x68\x74\x6D\x6C\x2D\x70\x64\x66","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\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","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x55\x73\x65\x72","\x69\x6E\x64\x65\x78","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x77\x68\x65\x72\x65","\x71\x75\x65\x72\x79","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x74\x65\x78\x74","\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x75\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x53\x45\x4E\x44\x49\x4E\x47","\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x41\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x54\x52\x41\x53\x48","\x62\x75\x6C\x6B\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x3499[0];var _=require(_0x3499[1]);var fs=require(_0x3499[2]);var path=require(_0x3499[3]);var uploadFile=require(_0x3499[4]);var uuidLib=require(_0x3499[5]);var pdf=require(_0x3499[6]);var formidable=require(_0x3499[7]);var exec=require(_0x3499[9])[_0x3499[8]];var config=require(_0x3499[10]);var logger=require(_0x3499[12])(_0x3499[11]);var FaxMessage=require(_0x3499[14])[_0x3499[13]];var FaxAttachment=require(_0x3499[14])[_0x3499[15]];var FaxRoom=require(_0x3499[14])[_0x3499[16]];var FaxAccount=require(_0x3499[14])[_0x3499[17]];var FaxAttachment=require(_0x3499[14])[_0x3499[15]];var User=require(_0x3499[14])[_0x3499[18]];exports[_0x3499[19]]= function(_0x1088x10,_0x1088x11,_0x1088x12){var _0x1088x13={order:_0x3499[20],include:[{all:true,include:[{all:true}]}]};switch(_0x1088x10[_0x3499[26]][_0x3499[25]]){case _0x3499[23]:_0x1088x13[_0x3499[21]]= _0x1088x10[_0x3499[22]];break;case _0x3499[24]:break;default:};return FaxMessage[_0x3499[31]](_0x1088x13)[_0x3499[30]](function(_0x1088x15){return _0x1088x11[_0x3499[29]](200)[_0x3499[28]](_0x1088x15)})[_0x3499[27]](function(_0x1088x14){return handleError(_0x1088x11,_0x1088x14,_0x1088x12)})};exports[_0x3499[32]]= function(_0x1088x10,_0x1088x11){return FaxMessage[_0x3499[32]]()[_0x3499[30]](function(_0x1088x16){return _0x1088x11[_0x3499[29]](200)[_0x3499[28]](_0x1088x16)})[_0x3499[27]](function(_0x1088x14){return handleError(_0x1088x11,_0x1088x14)})};exports[_0x3499[33]]= function(_0x1088x10,_0x1088x11,_0x1088x12){return FaxMessage[_0x3499[40]](_0x1088x10[_0x3499[36]][_0x3499[35]],{include:[{model:FaxAttachment},{model:User,attributes:[_0x3499[35],_0x3499[37],_0x3499[38],_0x3499[39]]}]})[_0x3499[30]](function(_0x1088x17){if(!_0x1088x17){return _0x1088x11[_0x3499[34]](404)};return _0x1088x11[_0x3499[28]](_0x1088x17)})[_0x3499[27]](function(_0x1088x14){return handleError(_0x1088x11,_0x1088x14,_0x1088x12)})};exports[_0x3499[41]]= function(_0x1088x10,_0x1088x11,_0x1088x12){_0x1088x10[_0x3499[43]][_0x3499[42]]= _0x1088x10[_0x3499[26]][_0x3499[35]];_0x1088x10[_0x3499[43]][_0x3499[44]]= _0x1088x10[_0x3499[43]][_0x3499[44]];return FaxMessage[_0x3499[41]](_0x1088x10[_0x3499[43]],{include:[{model:FaxAttachment}]})[_0x3499[30]](function(_0x1088x17){if(_0x1088x17){_0x1088x10[_0x3499[48]][_0x3499[47]][_0x3499[46]][_0x3499[28]]({message:_0x3499[45],doc:_0x1088x17,options:{user:_0x1088x10[_0x3499[26]]}})};return _0x1088x11[_0x3499[29]](201)[_0x3499[28]](_0x1088x17)})[_0x3499[27]](function(_0x1088x14){return handleError(_0x1088x11,_0x1088x14)})};exports[_0x3499[49]]= function(_0x1088x10,_0x1088x11,_0x1088x12){return FaxMessage[_0x3499[40]](_0x1088x10[_0x3499[36]][_0x3499[35]],{include:[{all:true}]})[_0x3499[30]](function(_0x1088x17){if(!_0x1088x17){return _0x1088x11[_0x3499[34]](404)};return _0x1088x17[_0x3499[53]](_0x1088x10[_0x3499[43]],{user:_0x1088x10[_0x3499[26]]})})[_0x3499[30]](function(_0x1088x18){if(_0x1088x18[_0x3499[50]](_0x3499[29])&& _0x1088x18[_0x3499[29]]=== _0x3499[51]){_0x1088x10[_0x3499[48]][_0x3499[47]][_0x3499[46]][_0x3499[28]]({message:_0x3499[52],doc:_0x1088x18,options:{user:_0x1088x10[_0x3499[26]]}})};return _0x1088x11[_0x3499[29]](200)[_0x3499[28]](_0x1088x18)})[_0x3499[27]](function(_0x1088x14){return handleError(_0x1088x11,_0x1088x14,_0x1088x12)})};exports[_0x3499[54]]= function(_0x1088x10,_0x1088x11,_0x1088x12){return FaxMessage[_0x3499[40]](_0x1088x10[_0x3499[36]][_0x3499[35]])[_0x3499[30]](function(_0x1088x17){if(!_0x1088x17){return _0x1088x11[_0x3499[34]](404)};return _0x1088x17[_0x3499[54]]()})[_0x3499[30]](function(){return _0x1088x11[_0x3499[34]](204)})[_0x3499[27]](function(_0x1088x14){return handleError(_0x1088x11,_0x1088x14,_0x1088x12)})};exports[_0x3499[55]]= function(_0x1088x10,_0x1088x11,_0x1088x12){return FaxMessage[_0x3499[57]]({where:{id:{$in:_0x1088x10[_0x3499[43]][_0x3499[35]]}},attributes:{directory:_0x3499[56]}})[_0x3499[30]](function(_0x1088x17){if(!_0x1088x17){return _0x1088x11[_0x3499[34]](404)};return _0x1088x17[_0x3499[54]]()})[_0x3499[30]](function(){return _0x1088x11[_0x3499[34]](204)})[_0x3499[27]](function(_0x1088x14){return handleError(_0x1088x11,_0x1088x14,_0x1088x12)})};function handleError(_0x1088x11,_0x1088x14,_0x1088x12){logger[_0x3499[59]](_0x1088x14[_0x3499[58]]);return _0x1088x11[_0x3499[29]](500)[_0x3499[28]](_0x1088x14)}
\ No newline at end of file
+var _0x18f1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x66\x73","\x70\x61\x74\x68","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x6E\x6F\x64\x65\x2D\x75\x75\x69\x64","\x68\x74\x6D\x6C\x2D\x70\x64\x66","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\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","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x55\x73\x65\x72","\x69\x6E\x64\x65\x78","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x77\x68\x65\x72\x65","\x71\x75\x65\x72\x79","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x74\x65\x78\x74","\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x75\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x53\x45\x4E\x44\x49\x4E\x47","\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x41\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x54\x52\x41\x53\x48","\x62\x75\x6C\x6B\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x18f1[0];var _=require(_0x18f1[1]);var fs=require(_0x18f1[2]);var path=require(_0x18f1[3]);var uploadFile=require(_0x18f1[4]);var uuidLib=require(_0x18f1[5]);var pdf=require(_0x18f1[6]);var formidable=require(_0x18f1[7]);var exec=require(_0x18f1[9])[_0x18f1[8]];var config=require(_0x18f1[10]);var logger=require(_0x18f1[12])(_0x18f1[11]);var FaxMessage=require(_0x18f1[14])[_0x18f1[13]];var FaxAttachment=require(_0x18f1[14])[_0x18f1[15]];var FaxRoom=require(_0x18f1[14])[_0x18f1[16]];var FaxAccount=require(_0x18f1[14])[_0x18f1[17]];var FaxAttachment=require(_0x18f1[14])[_0x18f1[15]];var User=require(_0x18f1[14])[_0x18f1[18]];exports[_0x18f1[19]]= function(_0x1c55x10,_0x1c55x11,_0x1c55x12){var _0x1c55x13={order:_0x18f1[20],include:[{all:true,include:[{all:true}]}]};switch(_0x1c55x10[_0x18f1[26]][_0x18f1[25]]){case _0x18f1[23]:_0x1c55x13[_0x18f1[21]]= _0x1c55x10[_0x18f1[22]];break;case _0x18f1[24]:break;default:};return FaxMessage[_0x18f1[31]](_0x1c55x13)[_0x18f1[30]](function(_0x1c55x15){return _0x1c55x11[_0x18f1[29]](200)[_0x18f1[28]](_0x1c55x15)})[_0x18f1[27]](function(_0x1c55x14){return handleError(_0x1c55x11,_0x1c55x14,_0x1c55x12)})};exports[_0x18f1[32]]= function(_0x1c55x10,_0x1c55x11){return FaxMessage[_0x18f1[32]]()[_0x18f1[30]](function(_0x1c55x16){return _0x1c55x11[_0x18f1[29]](200)[_0x18f1[28]](_0x1c55x16)})[_0x18f1[27]](function(_0x1c55x14){return handleError(_0x1c55x11,_0x1c55x14)})};exports[_0x18f1[33]]= function(_0x1c55x10,_0x1c55x11,_0x1c55x12){return FaxMessage[_0x18f1[40]](_0x1c55x10[_0x18f1[36]][_0x18f1[35]],{include:[{model:FaxAttachment},{model:User,attributes:[_0x18f1[35],_0x18f1[37],_0x18f1[38],_0x18f1[39]]}]})[_0x18f1[30]](function(_0x1c55x17){if(!_0x1c55x17){return _0x1c55x11[_0x18f1[34]](404)};return _0x1c55x11[_0x18f1[28]](_0x1c55x17)})[_0x18f1[27]](function(_0x1c55x14){return handleError(_0x1c55x11,_0x1c55x14,_0x1c55x12)})};exports[_0x18f1[41]]= function(_0x1c55x10,_0x1c55x11,_0x1c55x12){_0x1c55x10[_0x18f1[43]][_0x18f1[42]]= _0x1c55x10[_0x18f1[26]][_0x18f1[35]];_0x1c55x10[_0x18f1[43]][_0x18f1[44]]= _0x1c55x10[_0x18f1[43]][_0x18f1[44]];return FaxMessage[_0x18f1[41]](_0x1c55x10[_0x18f1[43]],{include:[{model:FaxAttachment}]})[_0x18f1[30]](function(_0x1c55x17){if(_0x1c55x17){_0x1c55x10[_0x18f1[48]][_0x18f1[47]][_0x18f1[46]][_0x18f1[28]]({message:_0x18f1[45],doc:_0x1c55x17,options:{user:_0x1c55x10[_0x18f1[26]]}})};return _0x1c55x11[_0x18f1[29]](201)[_0x18f1[28]](_0x1c55x17)})[_0x18f1[27]](function(_0x1c55x14){return handleError(_0x1c55x11,_0x1c55x14)})};exports[_0x18f1[49]]= function(_0x1c55x10,_0x1c55x11,_0x1c55x12){return FaxMessage[_0x18f1[40]](_0x1c55x10[_0x18f1[36]][_0x18f1[35]],{include:[{all:true}]})[_0x18f1[30]](function(_0x1c55x17){if(!_0x1c55x17){return _0x1c55x11[_0x18f1[34]](404)};return _0x1c55x17[_0x18f1[53]](_0x1c55x10[_0x18f1[43]],{user:_0x1c55x10[_0x18f1[26]]})})[_0x18f1[30]](function(_0x1c55x18){if(_0x1c55x18[_0x18f1[50]](_0x18f1[29])&& _0x1c55x18[_0x18f1[29]]=== _0x18f1[51]){_0x1c55x10[_0x18f1[48]][_0x18f1[47]][_0x18f1[46]][_0x18f1[28]]({message:_0x18f1[52],doc:_0x1c55x18,options:{user:_0x1c55x10[_0x18f1[26]]}})};return _0x1c55x11[_0x18f1[29]](200)[_0x18f1[28]](_0x1c55x18)})[_0x18f1[27]](function(_0x1c55x14){return handleError(_0x1c55x11,_0x1c55x14,_0x1c55x12)})};exports[_0x18f1[54]]= function(_0x1c55x10,_0x1c55x11,_0x1c55x12){return FaxMessage[_0x18f1[40]](_0x1c55x10[_0x18f1[36]][_0x18f1[35]])[_0x18f1[30]](function(_0x1c55x17){if(!_0x1c55x17){return _0x1c55x11[_0x18f1[34]](404)};return _0x1c55x17[_0x18f1[54]]()})[_0x18f1[30]](function(){return _0x1c55x11[_0x18f1[34]](204)})[_0x18f1[27]](function(_0x1c55x14){return handleError(_0x1c55x11,_0x1c55x14,_0x1c55x12)})};exports[_0x18f1[55]]= function(_0x1c55x10,_0x1c55x11,_0x1c55x12){return FaxMessage[_0x18f1[57]]({where:{id:{$in:_0x1c55x10[_0x18f1[43]][_0x18f1[35]]}},attributes:{directory:_0x18f1[56]}})[_0x18f1[30]](function(_0x1c55x17){if(!_0x1c55x17){return _0x1c55x11[_0x18f1[34]](404)};return _0x1c55x17[_0x18f1[54]]()})[_0x18f1[30]](function(){return _0x1c55x11[_0x18f1[34]](204)})[_0x18f1[27]](function(_0x1c55x14){return handleError(_0x1c55x11,_0x1c55x14,_0x1c55x12)})};function handleError(_0x1c55x11,_0x1c55x14,_0x1c55x12){logger[_0x18f1[59]](_0x1c55x14[_0x18f1[58]]);return _0x1c55x11[_0x18f1[29]](500)[_0x18f1[28]](_0x1c55x14)}
\ No newline at end of file