Built motion from commit (unavailable).|2.3.1
[motion2.git] / server / api / faxApplication / faxApplication.rpc.js
index a8f0ecc..5cae24b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x76eb=['error','code','message','catch','UpdateFaxApplication','update','options','raw','attributes','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','../../config/environment','client','http','request','info','FaxApplication,\x20%s,\x20%s','request\x20sent','debug','FaxApplication,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x19a2ac,_0x4c9f4f){var _0x15058e=function(_0x1fe434){while(--_0x1fe434){_0x19a2ac['push'](_0x19a2ac['shift']());}};_0x15058e(++_0x4c9f4f);}(_0x76eb,0xbf));var _0xb76e=function(_0x378720,_0xa711f1){_0x378720=_0x378720-0x0;var _0x47920a=_0x76eb[_0x378720];return _0x47920a;};'use strict';var _=require(_0xb76e('0x0'));var util=require(_0xb76e('0x1'));var moment=require(_0xb76e('0x2'));var BPromise=require(_0xb76e('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb76e('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xb76e('0x5'));var logger=require(_0xb76e('0x6'))('rpc');var config=require(_0xb76e('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xb76e('0x8')][_0xb76e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1679b0,_0x3006fe,_0x1eacd2){return new BPromise(function(_0x436db7,_0x389c60){return client[_0xb76e('0xa')](_0x1679b0,_0x1eacd2)['then'](function(_0x7d8003){logger[_0xb76e('0xb')](_0xb76e('0xc'),_0x3006fe,_0xb76e('0xd'));logger[_0xb76e('0xe')](_0xb76e('0xf'),_0x3006fe,_0xb76e('0xd'),JSON[_0xb76e('0x10')](_0x7d8003));if(_0x7d8003[_0xb76e('0x11')]){if(_0x7d8003['error'][_0xb76e('0x12')]===0x1f4){logger['error'](_0xb76e('0xc'),_0x3006fe,_0x7d8003[_0xb76e('0x11')][_0xb76e('0x13')]);return _0x389c60(_0x7d8003[_0xb76e('0x11')][_0xb76e('0x13')]);}logger[_0xb76e('0x11')](_0xb76e('0xc'),_0x3006fe,_0x7d8003[_0xb76e('0x11')][_0xb76e('0x13')]);return _0x436db7(_0x7d8003[_0xb76e('0x11')][_0xb76e('0x13')]);}else{logger['info'](_0xb76e('0xc'),_0x3006fe,_0xb76e('0xd'));_0x436db7(_0x7d8003['result'][_0xb76e('0x13')]);}})[_0xb76e('0x14')](function(_0x5cf383){logger[_0xb76e('0x11')](_0xb76e('0xc'),_0x3006fe,_0x5cf383);_0x389c60(_0x5cf383);});});}exports[_0xb76e('0x15')]=function(_0x413ee2){var _0x2fcaca=this;return new Promise(function(_0xb14d2e,_0x477206){return db['FaxApplication'][_0xb76e('0x16')](_0x413ee2['body'],{'raw':_0x413ee2[_0xb76e('0x17')]?_0x413ee2[_0xb76e('0x17')][_0xb76e('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x413ee2['options']?_0x413ee2[_0xb76e('0x17')]['where']||null:null,'attributes':_0x413ee2[_0xb76e('0x17')]?_0x413ee2[_0xb76e('0x17')][_0xb76e('0x19')]||null:null,'limit':_0x413ee2['options']?_0x413ee2['options']['limit']||null:null})['then'](function(_0x189956){logger['info']('UpdateFaxApplication',_0x413ee2);logger[_0xb76e('0xe')](_0xb76e('0x15'),_0x413ee2,JSON[_0xb76e('0x10')](_0x189956));_0xb14d2e(_0x189956);})[_0xb76e('0x14')](function(_0x58c2c7){logger['error'](_0xb76e('0x15'),_0x58c2c7[_0xb76e('0x13')],_0x413ee2);_0x477206(_0x2fcaca[_0xb76e('0x11')](0x1f4,_0x58c2c7[_0xb76e('0x13')]));});});};
\ No newline at end of file
+var _0xabf6=['attributes','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','request','info','FaxApplication,\x20%s,\x20%s','debug','FaxApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','UpdateFaxApplication','FaxApplication','options','raw','where'];(function(_0x1f5143,_0x5e31e6){var _0x383a38=function(_0x2c123c){while(--_0x2c123c){_0x1f5143['push'](_0x1f5143['shift']());}};_0x383a38(++_0x5e31e6);}(_0xabf6,0x1c4));var _0x6abf=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xabf6[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x6abf('0x0'));var util=require(_0x6abf('0x1'));var moment=require(_0x6abf('0x2'));var BPromise=require(_0x6abf('0x3'));var rs=require(_0x6abf('0x4'));var fs=require('fs');var Redis=require(_0x6abf('0x5'));var db=require(_0x6abf('0x6'))['db'];var utils=require(_0x6abf('0x7'));var logger=require(_0x6abf('0x8'))(_0x6abf('0x9'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x6abf('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4426f9,_0x75d0b9,_0x1421b5){return new BPromise(function(_0x2502cb,_0x1f8ff2){return client[_0x6abf('0xb')](_0x4426f9,_0x1421b5)['then'](function(_0x582549){logger[_0x6abf('0xc')](_0x6abf('0xd'),_0x75d0b9,'request\x20sent');logger[_0x6abf('0xe')](_0x6abf('0xf'),_0x75d0b9,_0x6abf('0x10'),JSON[_0x6abf('0x11')](_0x582549));if(_0x582549[_0x6abf('0x12')]){if(_0x582549[_0x6abf('0x12')][_0x6abf('0x13')]===0x1f4){logger[_0x6abf('0x12')]('FaxApplication,\x20%s,\x20%s',_0x75d0b9,_0x582549['error'][_0x6abf('0x14')]);return _0x1f8ff2(_0x582549[_0x6abf('0x12')][_0x6abf('0x14')]);}logger[_0x6abf('0x12')](_0x6abf('0xd'),_0x75d0b9,_0x582549[_0x6abf('0x12')][_0x6abf('0x14')]);return _0x2502cb(_0x582549[_0x6abf('0x12')][_0x6abf('0x14')]);}else{logger[_0x6abf('0xc')](_0x6abf('0xd'),_0x75d0b9,_0x6abf('0x10'));_0x2502cb(_0x582549[_0x6abf('0x15')][_0x6abf('0x14')]);}})[_0x6abf('0x16')](function(_0x3ddfb3){logger['error'](_0x6abf('0xd'),_0x75d0b9,_0x3ddfb3);_0x1f8ff2(_0x3ddfb3);});});}exports[_0x6abf('0x17')]=function(_0x1677e9){var _0x231586=this;return new Promise(function(_0x558109,_0x63f332){return db[_0x6abf('0x18')]['update'](_0x1677e9['body'],{'raw':_0x1677e9[_0x6abf('0x19')]?_0x1677e9[_0x6abf('0x19')][_0x6abf('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1677e9[_0x6abf('0x19')]?_0x1677e9[_0x6abf('0x19')][_0x6abf('0x1b')]||null:null,'attributes':_0x1677e9[_0x6abf('0x19')]?_0x1677e9[_0x6abf('0x19')][_0x6abf('0x1c')]||null:null,'limit':_0x1677e9[_0x6abf('0x19')]?_0x1677e9[_0x6abf('0x19')][_0x6abf('0x1d')]||null:null})['then'](function(_0x114f03){logger[_0x6abf('0xc')](_0x6abf('0x17'),_0x1677e9);logger['debug'](_0x6abf('0x17'),_0x1677e9,JSON['stringify'](_0x114f03));_0x558109(_0x114f03);})[_0x6abf('0x16')](function(_0x5c6633){logger[_0x6abf('0x12')](_0x6abf('0x17'),_0x5c6633['message'],_0x1677e9);_0x63f332(_0x231586[_0x6abf('0x12')](0x1f4,_0x5c6633[_0x6abf('0x14')]));});});};
\ No newline at end of file