Built motion from commit (unavailable).|2.5.22
[motion2.git] / server / api / smsAccount / smsAccount.rpc.js
index 30458f2..fbc66f4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdc52=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','register','request','info','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','SmsAccount','options','raw','attributes','include','map','model','then','ShowSmsAccount','lodash','moment'];(function(_0x17fc55,_0x545a26){var _0x38b2a0=function(_0x2f75ef){while(--_0x2f75ef){_0x17fc55['push'](_0x17fc55['shift']());}};_0x38b2a0(++_0x545a26);}(_0xdc52,0x8e));var _0x2dc5=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xdc52[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x2dc5('0x0'));var util=require('util');var moment=require(_0x2dc5('0x1'));var BPromise=require(_0x2dc5('0x2'));var rs=require(_0x2dc5('0x3'));var fs=require('fs');var Redis=require(_0x2dc5('0x4'));var db=require(_0x2dc5('0x5'))['db'];var utils=require(_0x2dc5('0x6'));var logger=require(_0x2dc5('0x7'))('rpc');var config=require(_0x2dc5('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x2dc5('0x9')][_0x2dc5('0xa')]({'port':0x232a});config[_0x2dc5('0xb')]=_[_0x2dc5('0xc')](config[_0x2dc5('0xb')],{'host':_0x2dc5('0xd'),'port':0x18eb});var socket=require(_0x2dc5('0xe'))(new Redis(config[_0x2dc5('0xb')]));require('./smsAccount.socket')[_0x2dc5('0xf')](socket);function respondWithRpcPromise(_0x4256aa,_0x2c5cb6,_0x57d7b2){return new BPromise(function(_0x4f0341,_0x557c1e){return client[_0x2dc5('0x10')](_0x4256aa,_0x57d7b2)['then'](function(_0x2470c7){logger[_0x2dc5('0x11')](_0x2dc5('0x12'),_0x2c5cb6,_0x2dc5('0x13'));logger[_0x2dc5('0x14')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x2c5cb6,_0x2dc5('0x13'),JSON[_0x2dc5('0x15')](_0x2470c7));if(_0x2470c7[_0x2dc5('0x16')]){if(_0x2470c7[_0x2dc5('0x16')][_0x2dc5('0x17')]===0x1f4){logger[_0x2dc5('0x16')](_0x2dc5('0x12'),_0x2c5cb6,_0x2470c7[_0x2dc5('0x16')]['message']);return _0x557c1e(_0x2470c7[_0x2dc5('0x16')][_0x2dc5('0x18')]);}logger[_0x2dc5('0x16')](_0x2dc5('0x12'),_0x2c5cb6,_0x2470c7[_0x2dc5('0x16')][_0x2dc5('0x18')]);return _0x4f0341(_0x2470c7[_0x2dc5('0x16')]['message']);}else{logger[_0x2dc5('0x11')](_0x2dc5('0x12'),_0x2c5cb6,_0x2dc5('0x13'));_0x4f0341(_0x2470c7[_0x2dc5('0x19')][_0x2dc5('0x18')]);}})[_0x2dc5('0x1a')](function(_0xb02ab0){logger[_0x2dc5('0x16')](_0x2dc5('0x12'),_0x2c5cb6,_0xb02ab0);_0x557c1e(_0xb02ab0);});});}exports['ShowSmsAccount']=function(_0x4c80be){var _0x26a2ca=this;return new Promise(function(_0x6b7e70,_0x2f3bc9){return db[_0x2dc5('0x1b')]['find']({'raw':_0x4c80be[_0x2dc5('0x1c')]?_0x4c80be[_0x2dc5('0x1c')][_0x2dc5('0x1d')]===undefined?!![]:![]:!![],'where':_0x4c80be[_0x2dc5('0x1c')]?_0x4c80be[_0x2dc5('0x1c')]['where']||null:null,'attributes':_0x4c80be[_0x2dc5('0x1c')]?_0x4c80be['options'][_0x2dc5('0x1e')]||null:null,'include':_0x4c80be[_0x2dc5('0x1c')]?_0x4c80be['options'][_0x2dc5('0x1f')]?_[_0x2dc5('0x20')](_0x4c80be['options'][_0x2dc5('0x1f')],function(_0x1a27cc){return{'model':db[_0x1a27cc[_0x2dc5('0x21')]],'as':_0x1a27cc['as'],'attributes':_0x1a27cc[_0x2dc5('0x1e')],'include':_0x1a27cc[_0x2dc5('0x1f')]?_['map'](_0x1a27cc[_0x2dc5('0x1f')],function(_0x56f627){return{'model':db[_0x56f627['model']],'as':_0x56f627['as'],'attributes':_0x56f627[_0x2dc5('0x1e')],'include':_0x56f627[_0x2dc5('0x1f')]?_[_0x2dc5('0x20')](_0x56f627['include'],function(_0x156b07){return{'model':db[_0x156b07[_0x2dc5('0x21')]],'as':_0x156b07['as'],'attributes':_0x156b07[_0x2dc5('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x2dc5('0x22')](function(_0x16d4cc){logger[_0x2dc5('0x11')](_0x2dc5('0x23'),_0x4c80be);logger[_0x2dc5('0x14')](_0x2dc5('0x23'),_0x4c80be,JSON['stringify'](_0x16d4cc));_0x6b7e70(_0x16d4cc);})[_0x2dc5('0x1a')](function(_0x74d0ca){logger[_0x2dc5('0x16')]('ShowSmsAccount',_0x74d0ca[_0x2dc5('0x18')],_0x4c80be);_0x2f3bc9(_0x26a2ca[_0x2dc5('0x16')](0x1f4,_0x74d0ca[_0x2dc5('0x18')]));});});};
\ No newline at end of file
+var _0xcbc1=['include','map','model','debug','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','socket.io-emitter','./smsAccount.socket','request','then','info','SmsAccount,\x20%s,\x20%s','SmsAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','catch','ShowSmsAccount','find','options','raw','where','attributes'];(function(_0x325890,_0x4cd3b8){var _0x44a15a=function(_0x17de7b){while(--_0x17de7b){_0x325890['push'](_0x325890['shift']());}};_0x44a15a(++_0x4cd3b8);}(_0xcbc1,0x100));var _0x1cbc=function(_0x5e6c41,_0x11e182){_0x5e6c41=_0x5e6c41-0x0;var _0x254e22=_0xcbc1[_0x5e6c41];return _0x254e22;};'use strict';var _=require(_0x1cbc('0x0'));var util=require(_0x1cbc('0x1'));var moment=require(_0x1cbc('0x2'));var BPromise=require(_0x1cbc('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1cbc('0x4'));var db=require(_0x1cbc('0x5'))['db'];var utils=require(_0x1cbc('0x6'));var logger=require(_0x1cbc('0x7'))(_0x1cbc('0x8'));var config=require(_0x1cbc('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x1cbc('0xa')][_0x1cbc('0xb')]({'port':0x232a});config[_0x1cbc('0xc')]=_['defaults'](config[_0x1cbc('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x1cbc('0xd'))(new Redis(config['redis']));require(_0x1cbc('0xe'))['register'](socket);function respondWithRpcPromise(_0x4ca09d,_0xd71850,_0x5d9b23){return new BPromise(function(_0xe296cf,_0x3b177c){return client[_0x1cbc('0xf')](_0x4ca09d,_0x5d9b23)[_0x1cbc('0x10')](function(_0x1273fb){logger[_0x1cbc('0x11')](_0x1cbc('0x12'),_0xd71850,'request\x20sent');logger['debug'](_0x1cbc('0x13'),_0xd71850,'request\x20sent',JSON[_0x1cbc('0x14')](_0x1273fb));if(_0x1273fb[_0x1cbc('0x15')]){if(_0x1273fb['error']['code']===0x1f4){logger[_0x1cbc('0x15')](_0x1cbc('0x12'),_0xd71850,_0x1273fb['error'][_0x1cbc('0x16')]);return _0x3b177c(_0x1273fb[_0x1cbc('0x15')][_0x1cbc('0x16')]);}logger['error'](_0x1cbc('0x12'),_0xd71850,_0x1273fb[_0x1cbc('0x15')][_0x1cbc('0x16')]);return _0xe296cf(_0x1273fb[_0x1cbc('0x15')][_0x1cbc('0x16')]);}else{logger[_0x1cbc('0x11')]('SmsAccount,\x20%s,\x20%s',_0xd71850,_0x1cbc('0x17'));_0xe296cf(_0x1273fb[_0x1cbc('0x18')][_0x1cbc('0x16')]);}})[_0x1cbc('0x19')](function(_0x455ebb){logger[_0x1cbc('0x15')]('SmsAccount,\x20%s,\x20%s',_0xd71850,_0x455ebb);_0x3b177c(_0x455ebb);});});}exports[_0x1cbc('0x1a')]=function(_0x371621){var _0xe6160=this;return new Promise(function(_0x52a390,_0x1651d0){return db['SmsAccount'][_0x1cbc('0x1b')]({'raw':_0x371621[_0x1cbc('0x1c')]?_0x371621[_0x1cbc('0x1c')][_0x1cbc('0x1d')]===undefined?!![]:![]:!![],'where':_0x371621['options']?_0x371621[_0x1cbc('0x1c')][_0x1cbc('0x1e')]||null:null,'attributes':_0x371621[_0x1cbc('0x1c')]?_0x371621[_0x1cbc('0x1c')][_0x1cbc('0x1f')]||null:null,'include':_0x371621[_0x1cbc('0x1c')]?_0x371621[_0x1cbc('0x1c')][_0x1cbc('0x20')]?_[_0x1cbc('0x21')](_0x371621['options'][_0x1cbc('0x20')],function(_0x1f6415){return{'model':db[_0x1f6415[_0x1cbc('0x22')]],'as':_0x1f6415['as'],'attributes':_0x1f6415['attributes'],'include':_0x1f6415[_0x1cbc('0x20')]?_[_0x1cbc('0x21')](_0x1f6415[_0x1cbc('0x20')],function(_0x3a8dfa){return{'model':db[_0x3a8dfa[_0x1cbc('0x22')]],'as':_0x3a8dfa['as'],'attributes':_0x3a8dfa[_0x1cbc('0x1f')],'include':_0x3a8dfa[_0x1cbc('0x20')]?_[_0x1cbc('0x21')](_0x3a8dfa[_0x1cbc('0x20')],function(_0x59069f){return{'model':db[_0x59069f['model']],'as':_0x59069f['as'],'attributes':_0x59069f[_0x1cbc('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x1cbc('0x10')](function(_0x2380b6){logger['info'](_0x1cbc('0x1a'),_0x371621);logger[_0x1cbc('0x23')](_0x1cbc('0x1a'),_0x371621,JSON[_0x1cbc('0x14')](_0x2380b6));_0x52a390(_0x2380b6);})[_0x1cbc('0x19')](function(_0x50b4be){logger[_0x1cbc('0x15')](_0x1cbc('0x1a'),_0x50b4be[_0x1cbc('0x16')],_0x371621);_0x1651d0(_0xe6160['error'](0x1f4,_0x50b4be[_0x1cbc('0x16')]));});});};
\ No newline at end of file