Built motion from commit d1eab355.|2.6.28
[motion2.git] / server / api / setting / setting.rpc.js
index c1c7c0a..45dacd2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0c8a=['rpc','../../config/environment','jayson/promise','client','then','request\x20sent','debug','Setting,\x20%s,\x20%s,\x20%s','stringify','error','Setting,\x20%s,\x20%s','message','info','result','catch','Setting','find','options','raw','where','map','model','attributes','include','ShowSetting','lodash','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x37ce45,_0xda6746){var _0x17d5f7=function(_0x559ab7){while(--_0x559ab7){_0x37ce45['push'](_0x37ce45['shift']());}};_0x17d5f7(++_0xda6746);}(_0x0c8a,0x1ac));var _0xa0c8=function(_0x4bc156,_0x5ab86e){_0x4bc156=_0x4bc156-0x0;var _0x33c7da=_0x0c8a[_0x4bc156];return _0x33c7da;};'use strict';var _=require(_0xa0c8('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xa0c8('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa0c8('0x2'));var db=require(_0xa0c8('0x3'))['db'];var utils=require(_0xa0c8('0x4'));var logger=require(_0xa0c8('0x5'))(_0xa0c8('0x6'));var config=require(_0xa0c8('0x7'));var jayson=require(_0xa0c8('0x8'));var client=jayson[_0xa0c8('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1b8a1f,_0x39304e,_0x3b5d64){return new BPromise(function(_0x2c0c04,_0x2c6086){return client['request'](_0x1b8a1f,_0x3b5d64)[_0xa0c8('0xa')](function(_0x4634ec){logger['info']('Setting,\x20%s,\x20%s',_0x39304e,_0xa0c8('0xb'));logger[_0xa0c8('0xc')](_0xa0c8('0xd'),_0x39304e,_0xa0c8('0xb'),JSON[_0xa0c8('0xe')](_0x4634ec));if(_0x4634ec[_0xa0c8('0xf')]){if(_0x4634ec['error']['code']===0x1f4){logger[_0xa0c8('0xf')](_0xa0c8('0x10'),_0x39304e,_0x4634ec['error'][_0xa0c8('0x11')]);return _0x2c6086(_0x4634ec['error'][_0xa0c8('0x11')]);}logger[_0xa0c8('0xf')](_0xa0c8('0x10'),_0x39304e,_0x4634ec[_0xa0c8('0xf')][_0xa0c8('0x11')]);return _0x2c0c04(_0x4634ec[_0xa0c8('0xf')][_0xa0c8('0x11')]);}else{logger[_0xa0c8('0x12')](_0xa0c8('0x10'),_0x39304e,'request\x20sent');_0x2c0c04(_0x4634ec[_0xa0c8('0x13')][_0xa0c8('0x11')]);}})[_0xa0c8('0x14')](function(_0x395c2e){logger['error'](_0xa0c8('0x10'),_0x39304e,_0x395c2e);_0x2c6086(_0x395c2e);});});}exports['ShowSetting']=function(_0x56cdb7){var _0x2fe1c3=this;return new Promise(function(_0x350791,_0x33c9f8){return db[_0xa0c8('0x15')][_0xa0c8('0x16')]({'raw':_0x56cdb7[_0xa0c8('0x17')]?_0x56cdb7['options'][_0xa0c8('0x18')]===undefined?!![]:![]:!![],'where':_0x56cdb7[_0xa0c8('0x17')]?_0x56cdb7[_0xa0c8('0x17')][_0xa0c8('0x19')]||null:null,'attributes':_0x56cdb7[_0xa0c8('0x17')]?_0x56cdb7['options']['attributes']||null:null,'include':_0x56cdb7[_0xa0c8('0x17')]?_0x56cdb7[_0xa0c8('0x17')]['include']?_[_0xa0c8('0x1a')](_0x56cdb7[_0xa0c8('0x17')]['include'],function(_0x2c5919){return{'model':db[_0x2c5919[_0xa0c8('0x1b')]],'as':_0x2c5919['as'],'attributes':_0x2c5919[_0xa0c8('0x1c')],'include':_0x2c5919['include']?_['map'](_0x2c5919[_0xa0c8('0x1d')],function(_0x2d3784){return{'model':db[_0x2d3784['model']],'as':_0x2d3784['as'],'attributes':_0x2d3784[_0xa0c8('0x1c')],'include':_0x2d3784[_0xa0c8('0x1d')]?_['map'](_0x2d3784[_0xa0c8('0x1d')],function(_0x534cb1){return{'model':db[_0x534cb1[_0xa0c8('0x1b')]],'as':_0x534cb1['as'],'attributes':_0x534cb1[_0xa0c8('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xa0c8('0xa')](function(_0x52224e){logger[_0xa0c8('0x12')](_0xa0c8('0x1e'),_0x56cdb7);logger['debug'](_0xa0c8('0x1e'),_0x56cdb7,JSON['stringify'](_0x52224e));_0x350791(_0x52224e);})['catch'](function(_0x3bce2c){logger[_0xa0c8('0xf')](_0xa0c8('0x1e'),_0x3bce2c[_0xa0c8('0x11')],_0x56cdb7);_0x33c9f8(_0x2fe1c3['error'](0x1f4,_0x3bce2c['message']));});});};
\ No newline at end of file
+var _0x894c=['error','code','message','result','catch','ShowSetting','find','options','raw','where','attributes','include','model','map','then','lodash','util','ioredis','../../mysqldb','../../config/utils','rpc','http','info','Setting,\x20%s,\x20%s','request\x20sent','debug','stringify'];(function(_0x138adb,_0x193fee){var _0x1b27f2=function(_0x5e97a2){while(--_0x5e97a2){_0x138adb['push'](_0x138adb['shift']());}};_0x1b27f2(++_0x193fee);}(_0x894c,0x1da));var _0xc894=function(_0x584b45,_0x219409){_0x584b45=_0x584b45-0x0;var _0xbd54c9=_0x894c[_0x584b45];return _0xbd54c9;};'use strict';var _=require(_0xc894('0x0'));var util=require(_0xc894('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc894('0x2'));var db=require(_0xc894('0x3'))['db'];var utils=require(_0xc894('0x4'));var logger=require('../../config/logger')(_0xc894('0x5'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0xc894('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x50e2a6,_0x4df558,_0xa92fb7){return new BPromise(function(_0x207fc9,_0x67d86f){return client['request'](_0x50e2a6,_0xa92fb7)['then'](function(_0xe4c3f4){logger[_0xc894('0x7')](_0xc894('0x8'),_0x4df558,_0xc894('0x9'));logger[_0xc894('0xa')]('Setting,\x20%s,\x20%s,\x20%s',_0x4df558,_0xc894('0x9'),JSON[_0xc894('0xb')](_0xe4c3f4));if(_0xe4c3f4[_0xc894('0xc')]){if(_0xe4c3f4[_0xc894('0xc')][_0xc894('0xd')]===0x1f4){logger['error']('Setting,\x20%s,\x20%s',_0x4df558,_0xe4c3f4[_0xc894('0xc')][_0xc894('0xe')]);return _0x67d86f(_0xe4c3f4[_0xc894('0xc')][_0xc894('0xe')]);}logger[_0xc894('0xc')]('Setting,\x20%s,\x20%s',_0x4df558,_0xe4c3f4[_0xc894('0xc')][_0xc894('0xe')]);return _0x207fc9(_0xe4c3f4[_0xc894('0xc')]['message']);}else{logger['info'](_0xc894('0x8'),_0x4df558,'request\x20sent');_0x207fc9(_0xe4c3f4[_0xc894('0xf')][_0xc894('0xe')]);}})[_0xc894('0x10')](function(_0x5ec674){logger[_0xc894('0xc')]('Setting,\x20%s,\x20%s',_0x4df558,_0x5ec674);_0x67d86f(_0x5ec674);});});}exports[_0xc894('0x11')]=function(_0x110e35){var _0x2fecc4=this;return new Promise(function(_0x5ae219,_0x124edf){return db['Setting'][_0xc894('0x12')]({'raw':_0x110e35[_0xc894('0x13')]?_0x110e35[_0xc894('0x13')][_0xc894('0x14')]===undefined?!![]:![]:!![],'where':_0x110e35[_0xc894('0x13')]?_0x110e35[_0xc894('0x13')][_0xc894('0x15')]||null:null,'attributes':_0x110e35['options']?_0x110e35[_0xc894('0x13')][_0xc894('0x16')]||null:null,'include':_0x110e35['options']?_0x110e35[_0xc894('0x13')]['include']?_['map'](_0x110e35[_0xc894('0x13')][_0xc894('0x17')],function(_0x508a13){return{'model':db[_0x508a13[_0xc894('0x18')]],'as':_0x508a13['as'],'attributes':_0x508a13['attributes'],'include':_0x508a13[_0xc894('0x17')]?_[_0xc894('0x19')](_0x508a13[_0xc894('0x17')],function(_0x2b8f1d){return{'model':db[_0x2b8f1d[_0xc894('0x18')]],'as':_0x2b8f1d['as'],'attributes':_0x2b8f1d[_0xc894('0x16')],'include':_0x2b8f1d[_0xc894('0x17')]?_['map'](_0x2b8f1d[_0xc894('0x17')],function(_0x2b5e7b){return{'model':db[_0x2b5e7b[_0xc894('0x18')]],'as':_0x2b5e7b['as'],'attributes':_0x2b5e7b['attributes']};}):[]};}):[]};}):[]:[]})[_0xc894('0x1a')](function(_0x38fb5f){logger[_0xc894('0x7')](_0xc894('0x11'),_0x110e35);logger[_0xc894('0xa')](_0xc894('0x11'),_0x110e35,JSON['stringify'](_0x38fb5f));_0x5ae219(_0x38fb5f);})[_0xc894('0x10')](function(_0x259e35){logger[_0xc894('0xc')]('ShowSetting',_0x259e35[_0xc894('0xe')],_0x110e35);_0x124edf(_0x2fecc4['error'](0x1f4,_0x259e35[_0xc894('0xe')]));});});};
\ No newline at end of file