Built motion from commit 712a57186.|1.0.37
[motion.git] / server / api / fax_attachment / fax_attachment.controller.js
index 30293f2..33db548 100644 (file)
@@ -1 +1 @@
-var _0x1fb3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\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","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\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","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x75\x70\x6C\x6F\x61\x64\x44\x69\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x66\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x72\x69\x67\x69\x6E\x61\x6C","\x6A\x6F\x69\x6E","\x6B\x65\x65\x70\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x6D\x75\x6C\x74\x69\x70\x6C\x65\x73","\x68\x61\x73\x68","\x66\x69\x6C\x65","\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x74\x79\x70\x65","\x70\x61\x72\x73\x65","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x75\x6E\x6C\x69\x6E\x6B","\x66\x73","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79"];_0x1fb3[0];var _=require(_0x1fb3[1]);var path=require(_0x1fb3[2]);var Util=require(_0x1fb3[3]);var formidable=require(_0x1fb3[4]);var Promise=require(_0x1fb3[5]);var logger=require(_0x1fb3[7])(_0x1fb3[6]);var config=require(_0x1fb3[8]);var FaxAttachment=require(_0x1fb3[10])[_0x1fb3[9]];function handleError(_0xce21xa,_0xce21xb){_0xce21xb= _0xce21xb|| 500;return function(_0xce21xc){logger[_0x1fb3[12]](_0xce21xc[_0x1fb3[11]]);_0xce21xa[_0x1fb3[14]](_0xce21xb)[_0x1fb3[13]](_0xce21xc)}}function responseWithResult(_0xce21xa,_0xce21xb){_0xce21xb= _0xce21xb|| 200;return function(_0xce21xe){if(_0xce21xe){_0xce21xa[_0x1fb3[14]](_0xce21xb)[_0x1fb3[15]](_0xce21xe)}}}function responseWithoutResult(_0xce21xa,_0xce21xb){_0xce21xb= _0xce21xb|| 204;return function(){_0xce21xa[_0x1fb3[16]](_0xce21xb)}}function handleEntityNotFound(_0xce21xa){return function(_0xce21xe){if(!_0xce21xe){_0xce21xa[_0x1fb3[14]](404)[_0x1fb3[17]]();return null};return _0xce21xe}}function saveUpdates(_0xce21x12){return function(_0xce21xe){return _0xce21xe[_0x1fb3[19]](_0xce21x12)[_0x1fb3[18]](function(_0xce21x13){return _0xce21x13})}}function removeEntity(_0xce21xa){return function(_0xce21xe){if(_0xce21xe){return _0xce21xe[_0x1fb3[20]]()[_0x1fb3[18]](function(){_0xce21xa[_0x1fb3[14]](204)[_0x1fb3[17]]()})}}}exports[_0x1fb3[21]]= function(_0xce21x15,_0xce21xa){return FaxAttachment[_0x1fb3[25]](Util[_0x1fb3[24]](_0xce21x15[_0x1fb3[23]]))[_0x1fb3[18]](responseWithResult(_0xce21xa))[_0x1fb3[22]](handleError(_0xce21xa))};exports[_0x1fb3[26]]= function(_0xce21x15,_0xce21xa){return FaxAttachment[_0x1fb3[30]](_0xce21x15[_0x1fb3[29]][_0x1fb3[28]])[_0x1fb3[18]](handleEntityNotFound(_0xce21xa))[_0x1fb3[18]](function(_0xce21x16){return _0xce21xa[_0x1fb3[27]](_0xce21x16[_0x1fb3[2]])})[_0x1fb3[22]](handleError(_0xce21xa))};exports[_0x1fb3[31]]= function(_0xce21x15,_0xce21xa){var _0xce21x17= new formidable.IncomingForm();_0xce21x17[_0x1fb3[32]]= path[_0x1fb3[39]](config[_0x1fb3[33]],_0x1fb3[34],_0x1fb3[35],_0x1fb3[36],_0x1fb3[37],_0x1fb3[38]);_0xce21x17[_0x1fb3[40]]= true;_0xce21x17[_0x1fb3[41]]= true;_0xce21x17[_0x1fb3[42]]= true;_0xce21x17[_0x1fb3[47]](_0xce21x15,function(_0xce21xc,_0xce21x17,_0xce21x18){if(_0xce21xc){return _0xce21xa[_0x1fb3[14]](500)[_0x1fb3[13]](_0xce21xc)};return _0xce21xa[_0x1fb3[14]](201)[_0x1fb3[13]]({path:_0xce21x18[_0x1fb3[43]][_0x1fb3[2]],name:_0xce21x18[_0x1fb3[43]][_0x1fb3[44]],basename:path[_0x1fb3[45]](_0xce21x18[_0x1fb3[43]][_0x1fb3[2]]),type:_0xce21x18[_0x1fb3[43]][_0x1fb3[46]]})})};exports[_0x1fb3[48]]= function(_0xce21x15,_0xce21xa){if(_0xce21x15[_0x1fb3[49]][_0x1fb3[28]]){delete _0xce21x15[_0x1fb3[49]][_0x1fb3[28]]};return FaxAttachment[_0x1fb3[30]](_0xce21x15[_0x1fb3[29]][_0x1fb3[28]])[_0x1fb3[18]](handleEntityNotFound(_0xce21xa))[_0x1fb3[18]](saveUpdates(_0xce21x15[_0x1fb3[49]]))[_0x1fb3[18]](responseWithResult(_0xce21xa))[_0x1fb3[22]](handleError(_0xce21xa))};exports[_0x1fb3[20]]= function(_0xce21x15,_0xce21xa){var _0xce21x19=Promise[_0x1fb3[52]](require(_0x1fb3[51])[_0x1fb3[50]]);var _0xce21x1a=path[_0x1fb3[39]](config[_0x1fb3[33]],_0x1fb3[34],_0x1fb3[35],_0x1fb3[36],_0x1fb3[37],_0x1fb3[38],_0xce21x15[_0x1fb3[29]][_0x1fb3[28]]);return _0xce21x19(_0xce21x1a)[_0x1fb3[18]](function(){return _0xce21xa[_0x1fb3[16]](204)})[_0x1fb3[22]](handleError(_0xce21xa))}
\ No newline at end of file
+var _0xfd7f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\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","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\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","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x75\x70\x6C\x6F\x61\x64\x44\x69\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x66\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x72\x69\x67\x69\x6E\x61\x6C","\x6A\x6F\x69\x6E","\x6B\x65\x65\x70\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x6D\x75\x6C\x74\x69\x70\x6C\x65\x73","\x68\x61\x73\x68","\x66\x69\x6C\x65","\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x74\x79\x70\x65","\x70\x61\x72\x73\x65","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x75\x6E\x6C\x69\x6E\x6B","\x66\x73","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79"];_0xfd7f[0];var _=require(_0xfd7f[1]);var path=require(_0xfd7f[2]);var Util=require(_0xfd7f[3]);var formidable=require(_0xfd7f[4]);var Promise=require(_0xfd7f[5]);var logger=require(_0xfd7f[7])(_0xfd7f[6]);var config=require(_0xfd7f[8]);var FaxAttachment=require(_0xfd7f[10])[_0xfd7f[9]];function handleError(_0x9924xa,_0x9924xb){_0x9924xb= _0x9924xb|| 500;return function(_0x9924xc){logger[_0xfd7f[12]](_0x9924xc[_0xfd7f[11]]);_0x9924xa[_0xfd7f[14]](_0x9924xb)[_0xfd7f[13]](_0x9924xc)}}function responseWithResult(_0x9924xa,_0x9924xb){_0x9924xb= _0x9924xb|| 200;return function(_0x9924xe){if(_0x9924xe){_0x9924xa[_0xfd7f[14]](_0x9924xb)[_0xfd7f[15]](_0x9924xe)}}}function responseWithoutResult(_0x9924xa,_0x9924xb){_0x9924xb= _0x9924xb|| 204;return function(){_0x9924xa[_0xfd7f[16]](_0x9924xb)}}function handleEntityNotFound(_0x9924xa){return function(_0x9924xe){if(!_0x9924xe){_0x9924xa[_0xfd7f[14]](404)[_0xfd7f[17]]();return null};return _0x9924xe}}function saveUpdates(_0x9924x12){return function(_0x9924xe){return _0x9924xe[_0xfd7f[19]](_0x9924x12)[_0xfd7f[18]](function(_0x9924x13){return _0x9924x13})}}function removeEntity(_0x9924xa){return function(_0x9924xe){if(_0x9924xe){return _0x9924xe[_0xfd7f[20]]()[_0xfd7f[18]](function(){_0x9924xa[_0xfd7f[14]](204)[_0xfd7f[17]]()})}}}exports[_0xfd7f[21]]= function(_0x9924x15,_0x9924xa){return FaxAttachment[_0xfd7f[25]](Util[_0xfd7f[24]](_0x9924x15[_0xfd7f[23]]))[_0xfd7f[18]](responseWithResult(_0x9924xa))[_0xfd7f[22]](handleError(_0x9924xa))};exports[_0xfd7f[26]]= function(_0x9924x15,_0x9924xa){return FaxAttachment[_0xfd7f[30]](_0x9924x15[_0xfd7f[29]][_0xfd7f[28]])[_0xfd7f[18]](handleEntityNotFound(_0x9924xa))[_0xfd7f[18]](function(_0x9924x16){return _0x9924xa[_0xfd7f[27]](_0x9924x16[_0xfd7f[2]])})[_0xfd7f[22]](handleError(_0x9924xa))};exports[_0xfd7f[31]]= function(_0x9924x15,_0x9924xa){var _0x9924x17= new formidable.IncomingForm();_0x9924x17[_0xfd7f[32]]= path[_0xfd7f[39]](config[_0xfd7f[33]],_0xfd7f[34],_0xfd7f[35],_0xfd7f[36],_0xfd7f[37],_0xfd7f[38]);_0x9924x17[_0xfd7f[40]]= true;_0x9924x17[_0xfd7f[41]]= true;_0x9924x17[_0xfd7f[42]]= true;_0x9924x17[_0xfd7f[47]](_0x9924x15,function(_0x9924xc,_0x9924x17,_0x9924x18){if(_0x9924xc){return _0x9924xa[_0xfd7f[14]](500)[_0xfd7f[13]](_0x9924xc)};return _0x9924xa[_0xfd7f[14]](201)[_0xfd7f[13]]({path:_0x9924x18[_0xfd7f[43]][_0xfd7f[2]],name:_0x9924x18[_0xfd7f[43]][_0xfd7f[44]],basename:path[_0xfd7f[45]](_0x9924x18[_0xfd7f[43]][_0xfd7f[2]]),type:_0x9924x18[_0xfd7f[43]][_0xfd7f[46]]})})};exports[_0xfd7f[48]]= function(_0x9924x15,_0x9924xa){if(_0x9924x15[_0xfd7f[49]][_0xfd7f[28]]){delete _0x9924x15[_0xfd7f[49]][_0xfd7f[28]]};return FaxAttachment[_0xfd7f[30]](_0x9924x15[_0xfd7f[29]][_0xfd7f[28]])[_0xfd7f[18]](handleEntityNotFound(_0x9924xa))[_0xfd7f[18]](saveUpdates(_0x9924x15[_0xfd7f[49]]))[_0xfd7f[18]](responseWithResult(_0x9924xa))[_0xfd7f[22]](handleError(_0x9924xa))};exports[_0xfd7f[20]]= function(_0x9924x15,_0x9924xa){var _0x9924x19=Promise[_0xfd7f[52]](require(_0xfd7f[51])[_0xfd7f[50]]);var _0x9924x1a=path[_0xfd7f[39]](config[_0xfd7f[33]],_0xfd7f[34],_0xfd7f[35],_0xfd7f[36],_0xfd7f[37],_0xfd7f[38],_0x9924x15[_0xfd7f[29]][_0xfd7f[28]]);return _0x9924x19(_0x9924x1a)[_0xfd7f[18]](function(){return _0x9924xa[_0xfd7f[16]](204)})[_0xfd7f[22]](handleError(_0x9924xa))}
\ No newline at end of file