Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / faxApplication / faxApplication.rpc.js
index ca7db88..d803efc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0db9=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','http','request','then','info','FaxApplication,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','UpdateFaxApplication','FaxApplication','update','options','where','attributes','lodash','util','bluebird'];(function(_0x7e81c4,_0x3ca1ff){var _0x1b10e3=function(_0x3b0a42){while(--_0x3b0a42){_0x7e81c4['push'](_0x7e81c4['shift']());}};_0x1b10e3(++_0x3ca1ff);}(_0x0db9,0x69));var _0x90db=function(_0x440917,_0x20ea7b){_0x440917=_0x440917-0x0;var _0x5e906b=_0x0db9[_0x440917];return _0x5e906b;};'use strict';var _=require(_0x90db('0x0'));var util=require(_0x90db('0x1'));var moment=require('moment');var BPromise=require(_0x90db('0x2'));var rs=require(_0x90db('0x3'));var fs=require('fs');var Redis=require(_0x90db('0x4'));var db=require(_0x90db('0x5'))['db'];var utils=require(_0x90db('0x6'));var logger=require(_0x90db('0x7'))('rpc');var config=require(_0x90db('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0x90db('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2d2012,_0x369112,_0xde0986){return new BPromise(function(_0x309339,_0x43b9da){return client[_0x90db('0xa')](_0x2d2012,_0xde0986)[_0x90db('0xb')](function(_0x1e5d2f){logger[_0x90db('0xc')](_0x90db('0xd'),_0x369112,_0x90db('0xe'));logger[_0x90db('0xf')]('FaxApplication,\x20%s,\x20%s,\x20%s',_0x369112,_0x90db('0xe'),JSON[_0x90db('0x10')](_0x1e5d2f));if(_0x1e5d2f[_0x90db('0x11')]){if(_0x1e5d2f[_0x90db('0x11')][_0x90db('0x12')]===0x1f4){logger[_0x90db('0x11')](_0x90db('0xd'),_0x369112,_0x1e5d2f[_0x90db('0x11')][_0x90db('0x13')]);return _0x43b9da(_0x1e5d2f[_0x90db('0x11')][_0x90db('0x13')]);}logger[_0x90db('0x11')](_0x90db('0xd'),_0x369112,_0x1e5d2f[_0x90db('0x11')]['message']);return _0x309339(_0x1e5d2f['error'][_0x90db('0x13')]);}else{logger[_0x90db('0xc')](_0x90db('0xd'),_0x369112,'request\x20sent');_0x309339(_0x1e5d2f['result'][_0x90db('0x13')]);}})[_0x90db('0x14')](function(_0x82886){logger[_0x90db('0x11')]('FaxApplication,\x20%s,\x20%s',_0x369112,_0x82886);_0x43b9da(_0x82886);});});}exports[_0x90db('0x15')]=function(_0x114db5){var _0xf27a34=this;return new Promise(function(_0x2ee7c6,_0x2c6117){return db[_0x90db('0x16')][_0x90db('0x17')](_0x114db5['body'],{'raw':_0x114db5['options']?_0x114db5[_0x90db('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x114db5['options']?_0x114db5[_0x90db('0x18')][_0x90db('0x19')]||null:null,'attributes':_0x114db5[_0x90db('0x18')]?_0x114db5[_0x90db('0x18')][_0x90db('0x1a')]||null:null,'limit':_0x114db5[_0x90db('0x18')]?_0x114db5['options']['limit']||null:null})['then'](function(_0xfa445c){logger[_0x90db('0xc')]('UpdateFaxApplication',_0x114db5);logger[_0x90db('0xf')](_0x90db('0x15'),_0x114db5,JSON[_0x90db('0x10')](_0xfa445c));_0x2ee7c6(_0xfa445c);})[_0x90db('0x14')](function(_0x527bb9){logger[_0x90db('0x11')]('UpdateFaxApplication',_0x527bb9[_0x90db('0x13')],_0x114db5);_0x2c6117(_0xf27a34[_0x90db('0x11')](0x1f4,_0x527bb9['message']));});});};
\ No newline at end of file
+var _0x5646=['request','info','debug','FaxApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','FaxApplication,\x20%s,\x20%s','catch','UpdateFaxApplication','FaxApplication','update','body','options','raw','where','limit','then','lodash','util','moment','bluebird','randomstring','../../config/logger','rpc','../../config/environment','client','http'];(function(_0x1e46d8,_0x44fe74){var _0x52bd0f=function(_0x30e28a){while(--_0x30e28a){_0x1e46d8['push'](_0x1e46d8['shift']());}};_0x52bd0f(++_0x44fe74);}(_0x5646,0x1b8));var _0x6564=function(_0x421196,_0x1cbd94){_0x421196=_0x421196-0x0;var _0x2738af=_0x5646[_0x421196];return _0x2738af;};'use strict';var _=require(_0x6564('0x0'));var util=require(_0x6564('0x1'));var moment=require(_0x6564('0x2'));var BPromise=require(_0x6564('0x3'));var rs=require(_0x6564('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x6564('0x5'))(_0x6564('0x6'));var config=require(_0x6564('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x6564('0x8')][_0x6564('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x476edc,_0x296800,_0x308026){return new BPromise(function(_0x4b6c9f,_0x4e9227){return client[_0x6564('0xa')](_0x476edc,_0x308026)['then'](function(_0x4826cf){logger[_0x6564('0xb')]('FaxApplication,\x20%s,\x20%s',_0x296800,'request\x20sent');logger[_0x6564('0xc')](_0x6564('0xd'),_0x296800,_0x6564('0xe'),JSON[_0x6564('0xf')](_0x4826cf));if(_0x4826cf[_0x6564('0x10')]){if(_0x4826cf[_0x6564('0x10')][_0x6564('0x11')]===0x1f4){logger[_0x6564('0x10')]('FaxApplication,\x20%s,\x20%s',_0x296800,_0x4826cf['error'][_0x6564('0x12')]);return _0x4e9227(_0x4826cf['error']['message']);}logger[_0x6564('0x10')](_0x6564('0x13'),_0x296800,_0x4826cf[_0x6564('0x10')][_0x6564('0x12')]);return _0x4b6c9f(_0x4826cf[_0x6564('0x10')][_0x6564('0x12')]);}else{logger['info'](_0x6564('0x13'),_0x296800,_0x6564('0xe'));_0x4b6c9f(_0x4826cf['result'][_0x6564('0x12')]);}})[_0x6564('0x14')](function(_0x175a91){logger[_0x6564('0x10')](_0x6564('0x13'),_0x296800,_0x175a91);_0x4e9227(_0x175a91);});});}exports[_0x6564('0x15')]=function(_0xf58bc){var _0x5dc108=this;return new Promise(function(_0x2596b8,_0x4cabde){return db[_0x6564('0x16')][_0x6564('0x17')](_0xf58bc[_0x6564('0x18')],{'raw':_0xf58bc[_0x6564('0x19')]?_0xf58bc['options'][_0x6564('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xf58bc[_0x6564('0x19')]?_0xf58bc[_0x6564('0x19')][_0x6564('0x1b')]||null:null,'attributes':_0xf58bc[_0x6564('0x19')]?_0xf58bc[_0x6564('0x19')]['attributes']||null:null,'limit':_0xf58bc[_0x6564('0x19')]?_0xf58bc[_0x6564('0x19')][_0x6564('0x1c')]||null:null})[_0x6564('0x1d')](function(_0x550e0c){logger[_0x6564('0xb')]('UpdateFaxApplication',_0xf58bc);logger[_0x6564('0xc')](_0x6564('0x15'),_0xf58bc,JSON[_0x6564('0xf')](_0x550e0c));_0x2596b8(_0x550e0c);})[_0x6564('0x14')](function(_0x9f1920){logger[_0x6564('0x10')](_0x6564('0x15'),_0x9f1920[_0x6564('0x12')],_0xf58bc);_0x4cabde(_0x5dc108['error'](0x1f4,_0x9f1920['message']));});});};
\ No newline at end of file