Built motion from commit b5996064.|2.6.21
[motion2.git] / server / api / openchannelApplication / openchannelApplication.rpc.js
index daea6c1..7073e35 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc93d=['lodash','util','bluebird','randomstring','../../config/utils','../../config/logger','../../config/environment','client','http','request','info','OpenchannelApplication,\x20%s,\x20%s','request\x20sent','debug','OpenchannelApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','UpdateOpenchannelApplication','OpenchannelApplication','update','body','options','where','attributes'];(function(_0x36c55d,_0x1c8efa){var _0xa16625=function(_0x3071f7){while(--_0x3071f7){_0x36c55d['push'](_0x36c55d['shift']());}};_0xa16625(++_0x1c8efa);}(_0xc93d,0x1e6));var _0xdc93=function(_0x37f6d8,_0x444925){_0x37f6d8=_0x37f6d8-0x0;var _0x49f67b=_0xc93d[_0x37f6d8];return _0x49f67b;};'use strict';var _=require(_0xdc93('0x0'));var util=require(_0xdc93('0x1'));var moment=require('moment');var BPromise=require(_0xdc93('0x2'));var rs=require(_0xdc93('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xdc93('0x4'));var logger=require(_0xdc93('0x5'))('rpc');var config=require(_0xdc93('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xdc93('0x7')][_0xdc93('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x35456b,_0xd4eaea,_0x270842){return new BPromise(function(_0x299ed1,_0x415aca){return client[_0xdc93('0x9')](_0x35456b,_0x270842)['then'](function(_0x421d0d){logger[_0xdc93('0xa')](_0xdc93('0xb'),_0xd4eaea,_0xdc93('0xc'));logger[_0xdc93('0xd')](_0xdc93('0xe'),_0xd4eaea,'request\x20sent',JSON[_0xdc93('0xf')](_0x421d0d));if(_0x421d0d[_0xdc93('0x10')]){if(_0x421d0d[_0xdc93('0x10')][_0xdc93('0x11')]===0x1f4){logger['error'](_0xdc93('0xb'),_0xd4eaea,_0x421d0d[_0xdc93('0x10')][_0xdc93('0x12')]);return _0x415aca(_0x421d0d[_0xdc93('0x10')][_0xdc93('0x12')]);}logger[_0xdc93('0x10')](_0xdc93('0xb'),_0xd4eaea,_0x421d0d[_0xdc93('0x10')][_0xdc93('0x12')]);return _0x299ed1(_0x421d0d[_0xdc93('0x10')][_0xdc93('0x12')]);}else{logger[_0xdc93('0xa')](_0xdc93('0xb'),_0xd4eaea,_0xdc93('0xc'));_0x299ed1(_0x421d0d['result']['message']);}})[_0xdc93('0x13')](function(_0x1ce137){logger[_0xdc93('0x10')](_0xdc93('0xb'),_0xd4eaea,_0x1ce137);_0x415aca(_0x1ce137);});});}exports[_0xdc93('0x14')]=function(_0x1e6bf3){var _0x27388d=this;return new Promise(function(_0x23e751,_0x192a47){return db[_0xdc93('0x15')][_0xdc93('0x16')](_0x1e6bf3[_0xdc93('0x17')],{'raw':_0x1e6bf3[_0xdc93('0x18')]?_0x1e6bf3[_0xdc93('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1e6bf3['options']?_0x1e6bf3['options'][_0xdc93('0x19')]||null:null,'attributes':_0x1e6bf3[_0xdc93('0x18')]?_0x1e6bf3[_0xdc93('0x18')][_0xdc93('0x1a')]||null:null,'limit':_0x1e6bf3[_0xdc93('0x18')]?_0x1e6bf3[_0xdc93('0x18')]['limit']||null:null})['then'](function(_0x58e6ed){logger[_0xdc93('0xa')]('UpdateOpenchannelApplication',_0x1e6bf3);logger[_0xdc93('0xd')](_0xdc93('0x14'),_0x1e6bf3,JSON[_0xdc93('0xf')](_0x58e6ed));_0x23e751(_0x58e6ed);})[_0xdc93('0x13')](function(_0xd4ea85){logger['error'](_0xdc93('0x14'),_0xd4ea85[_0xdc93('0x12')],_0x1e6bf3);_0x192a47(_0x27388d['error'](0x1f4,_0xd4ea85[_0xdc93('0x12')]));});});};
\ No newline at end of file
+var _0xa4b4=['moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','debug','OpenchannelApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','OpenchannelApplication,\x20%s,\x20%s','message','UpdateOpenchannelApplication','OpenchannelApplication','update','body','options','raw','where','limit','lodash','util'];(function(_0xe111d,_0x530bb4){var _0x4f8927=function(_0xce464f){while(--_0xce464f){_0xe111d['push'](_0xe111d['shift']());}};_0x4f8927(++_0x530bb4);}(_0xa4b4,0xc9));var _0x4a4b=function(_0x208505,_0x241a77){_0x208505=_0x208505-0x0;var _0x1a985f=_0xa4b4[_0x208505];return _0x1a985f;};'use strict';var _=require(_0x4a4b('0x0'));var util=require(_0x4a4b('0x1'));var moment=require(_0x4a4b('0x2'));var BPromise=require('bluebird');var rs=require(_0x4a4b('0x3'));var fs=require('fs');var Redis=require(_0x4a4b('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x4a4b('0x5'));var logger=require(_0x4a4b('0x6'))(_0x4a4b('0x7'));var config=require(_0x4a4b('0x8'));var jayson=require(_0x4a4b('0x9'));var client=jayson[_0x4a4b('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4d0493,_0x3e5648,_0x480411){return new BPromise(function(_0x314b8b,_0x32224f){return client[_0x4a4b('0xb')](_0x4d0493,_0x480411)[_0x4a4b('0xc')](function(_0x4b9fe1){logger[_0x4a4b('0xd')]('OpenchannelApplication,\x20%s,\x20%s',_0x3e5648,'request\x20sent');logger[_0x4a4b('0xe')](_0x4a4b('0xf'),_0x3e5648,_0x4a4b('0x10'),JSON[_0x4a4b('0x11')](_0x4b9fe1));if(_0x4b9fe1[_0x4a4b('0x12')]){if(_0x4b9fe1['error']['code']===0x1f4){logger[_0x4a4b('0x12')](_0x4a4b('0x13'),_0x3e5648,_0x4b9fe1[_0x4a4b('0x12')][_0x4a4b('0x14')]);return _0x32224f(_0x4b9fe1['error']['message']);}logger[_0x4a4b('0x12')](_0x4a4b('0x13'),_0x3e5648,_0x4b9fe1[_0x4a4b('0x12')]['message']);return _0x314b8b(_0x4b9fe1['error']['message']);}else{logger['info'](_0x4a4b('0x13'),_0x3e5648,_0x4a4b('0x10'));_0x314b8b(_0x4b9fe1['result'][_0x4a4b('0x14')]);}})['catch'](function(_0x206f3c){logger[_0x4a4b('0x12')](_0x4a4b('0x13'),_0x3e5648,_0x206f3c);_0x32224f(_0x206f3c);});});}exports[_0x4a4b('0x15')]=function(_0x492f2b){var _0x1be4ce=this;return new Promise(function(_0x2c06ea,_0x48b31f){return db[_0x4a4b('0x16')][_0x4a4b('0x17')](_0x492f2b[_0x4a4b('0x18')],{'raw':_0x492f2b[_0x4a4b('0x19')]?_0x492f2b['options'][_0x4a4b('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x492f2b['options']?_0x492f2b[_0x4a4b('0x19')][_0x4a4b('0x1b')]||null:null,'attributes':_0x492f2b['options']?_0x492f2b['options']['attributes']||null:null,'limit':_0x492f2b[_0x4a4b('0x19')]?_0x492f2b[_0x4a4b('0x19')][_0x4a4b('0x1c')]||null:null})[_0x4a4b('0xc')](function(_0x42e304){logger[_0x4a4b('0xd')]('UpdateOpenchannelApplication',_0x492f2b);logger[_0x4a4b('0xe')](_0x4a4b('0x15'),_0x492f2b,JSON[_0x4a4b('0x11')](_0x42e304));_0x2c06ea(_0x42e304);})['catch'](function(_0x13a182){logger[_0x4a4b('0x12')]('UpdateOpenchannelApplication',_0x13a182[_0x4a4b('0x14')],_0x492f2b);_0x48b31f(_0x1be4ce['error'](0x1f4,_0x13a182[_0x4a4b('0x14')]));});});};
\ No newline at end of file