Built motion from commit 838c2833.|2.6.24
[motion2.git] / server / api / faxApplication / faxApplication.rpc.js
index ca05f65..35fe148 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x59a8=['UpdateFaxApplication','FaxApplication','update','body','options','raw','where','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','client','request','then','info','FaxApplication,\x20%s,\x20%s','debug','FaxApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch'];(function(_0x2d2b84,_0x35aa11){var _0x2e268d=function(_0x2e5026){while(--_0x2e5026){_0x2d2b84['push'](_0x2d2b84['shift']());}};_0x2e268d(++_0x35aa11);}(_0x59a8,0x100));var _0x859a=function(_0x5a8c3f,_0x54bde6){_0x5a8c3f=_0x5a8c3f-0x0;var _0x2a00d1=_0x59a8[_0x5a8c3f];return _0x2a00d1;};'use strict';var _=require(_0x859a('0x0'));var util=require(_0x859a('0x1'));var moment=require(_0x859a('0x2'));var BPromise=require(_0x859a('0x3'));var rs=require(_0x859a('0x4'));var fs=require('fs');var Redis=require(_0x859a('0x5'));var db=require(_0x859a('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x859a('0x7'))(_0x859a('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x859a('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x48444d,_0x4c7b96,_0x4c8f3c){return new BPromise(function(_0x317ed8,_0xe8b563){return client[_0x859a('0xa')](_0x48444d,_0x4c8f3c)[_0x859a('0xb')](function(_0x149779){logger[_0x859a('0xc')](_0x859a('0xd'),_0x4c7b96,'request\x20sent');logger[_0x859a('0xe')](_0x859a('0xf'),_0x4c7b96,_0x859a('0x10'),JSON[_0x859a('0x11')](_0x149779));if(_0x149779[_0x859a('0x12')]){if(_0x149779['error'][_0x859a('0x13')]===0x1f4){logger[_0x859a('0x12')](_0x859a('0xd'),_0x4c7b96,_0x149779['error'][_0x859a('0x14')]);return _0xe8b563(_0x149779[_0x859a('0x12')][_0x859a('0x14')]);}logger[_0x859a('0x12')](_0x859a('0xd'),_0x4c7b96,_0x149779[_0x859a('0x12')]['message']);return _0x317ed8(_0x149779[_0x859a('0x12')][_0x859a('0x14')]);}else{logger[_0x859a('0xc')](_0x859a('0xd'),_0x4c7b96,_0x859a('0x10'));_0x317ed8(_0x149779[_0x859a('0x15')][_0x859a('0x14')]);}})[_0x859a('0x16')](function(_0x3a5ab0){logger[_0x859a('0x12')](_0x859a('0xd'),_0x4c7b96,_0x3a5ab0);_0xe8b563(_0x3a5ab0);});});}exports[_0x859a('0x17')]=function(_0x319123){var _0x1624fc=this;return new Promise(function(_0x1ed68e,_0x30a2ca){return db[_0x859a('0x18')][_0x859a('0x19')](_0x319123[_0x859a('0x1a')],{'raw':_0x319123[_0x859a('0x1b')]?_0x319123['options'][_0x859a('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x319123[_0x859a('0x1b')]?_0x319123['options'][_0x859a('0x1d')]||null:null,'attributes':_0x319123[_0x859a('0x1b')]?_0x319123['options']['attributes']||null:null,'limit':_0x319123[_0x859a('0x1b')]?_0x319123[_0x859a('0x1b')][_0x859a('0x1e')]||null:null})['then'](function(_0x4a163a){logger[_0x859a('0xc')](_0x859a('0x17'),_0x319123);logger[_0x859a('0xe')](_0x859a('0x17'),_0x319123,JSON[_0x859a('0x11')](_0x4a163a));_0x1ed68e(_0x4a163a);})['catch'](function(_0x3a22af){logger[_0x859a('0x12')]('UpdateFaxApplication',_0x3a22af['message'],_0x319123);_0x30a2ca(_0x1624fc[_0x859a('0x12')](0x1f4,_0x3a22af[_0x859a('0x14')]));});});};
\ No newline at end of file
+var _0x927f=['result','catch','body','options','raw','where','limit','info','UpdateFaxApplication','lodash','moment','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','FaxApplication,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message'];(function(_0x73e915,_0x93d06a){var _0x19d1d2=function(_0x18687e){while(--_0x18687e){_0x73e915['push'](_0x73e915['shift']());}};_0x19d1d2(++_0x93d06a);}(_0x927f,0x10d));var _0xf927=function(_0x21eb1f,_0x45aa67){_0x21eb1f=_0x21eb1f-0x0;var _0x10cd07=_0x927f[_0x21eb1f];return _0x10cd07;};'use strict';var _=require(_0xf927('0x0'));var util=require('util');var moment=require(_0xf927('0x1'));var BPromise=require(_0xf927('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xf927('0x3'));var logger=require(_0xf927('0x4'))(_0xf927('0x5'));var config=require(_0xf927('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xf927('0x7')][_0xf927('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x55e03e,_0x2a7de9,_0x5843bb){return new BPromise(function(_0x125172,_0x334f19){return client[_0xf927('0x9')](_0x55e03e,_0x5843bb)[_0xf927('0xa')](function(_0x2edf82){logger['info'](_0xf927('0xb'),_0x2a7de9,_0xf927('0xc'));logger[_0xf927('0xd')]('FaxApplication,\x20%s,\x20%s,\x20%s',_0x2a7de9,_0xf927('0xc'),JSON[_0xf927('0xe')](_0x2edf82));if(_0x2edf82['error']){if(_0x2edf82['error']['code']===0x1f4){logger['error'](_0xf927('0xb'),_0x2a7de9,_0x2edf82[_0xf927('0xf')][_0xf927('0x10')]);return _0x334f19(_0x2edf82['error']['message']);}logger[_0xf927('0xf')](_0xf927('0xb'),_0x2a7de9,_0x2edf82[_0xf927('0xf')]['message']);return _0x125172(_0x2edf82[_0xf927('0xf')]['message']);}else{logger['info'](_0xf927('0xb'),_0x2a7de9,_0xf927('0xc'));_0x125172(_0x2edf82[_0xf927('0x11')][_0xf927('0x10')]);}})[_0xf927('0x12')](function(_0x37d4bc){logger[_0xf927('0xf')]('FaxApplication,\x20%s,\x20%s',_0x2a7de9,_0x37d4bc);_0x334f19(_0x37d4bc);});});}exports['UpdateFaxApplication']=function(_0xe2ae2e){var _0x3bd9ff=this;return new Promise(function(_0x518fa6,_0xcd1809){return db['FaxApplication']['update'](_0xe2ae2e[_0xf927('0x13')],{'raw':_0xe2ae2e[_0xf927('0x14')]?_0xe2ae2e[_0xf927('0x14')][_0xf927('0x15')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xe2ae2e[_0xf927('0x14')]?_0xe2ae2e[_0xf927('0x14')][_0xf927('0x16')]||null:null,'attributes':_0xe2ae2e[_0xf927('0x14')]?_0xe2ae2e['options']['attributes']||null:null,'limit':_0xe2ae2e['options']?_0xe2ae2e['options'][_0xf927('0x17')]||null:null})[_0xf927('0xa')](function(_0x292e53){logger[_0xf927('0x18')](_0xf927('0x19'),_0xe2ae2e);logger[_0xf927('0xd')](_0xf927('0x19'),_0xe2ae2e,JSON[_0xf927('0xe')](_0x292e53));_0x518fa6(_0x292e53);})[_0xf927('0x12')](function(_0x1ada36){logger[_0xf927('0xf')](_0xf927('0x19'),_0x1ada36[_0xf927('0x10')],_0xe2ae2e);_0xcd1809(_0x3bd9ff[_0xf927('0xf')](0x1f4,_0x1ada36[_0xf927('0x10')]));});});};
\ No newline at end of file