Built motion from commit 953226e6.|2.6.32
[motion2.git] / server / api / setting / setting.rpc.js
index 53e348c..c91c071 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6a3c=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Setting,\x20%s,\x20%s','request\x20sent','debug','Setting,\x20%s,\x20%s,\x20%s','stringify','error','result','catch','ShowSetting','find','options','where','attributes','include','map','model','message','lodash','moment','randomstring'];(function(_0x1fe7bf,_0x24493f){var _0x340e1f=function(_0x4e13df){while(--_0x4e13df){_0x1fe7bf['push'](_0x1fe7bf['shift']());}};_0x340e1f(++_0x24493f);}(_0x6a3c,0x7d));var _0xc6a3=function(_0x3064a5,_0x9bb2f9){_0x3064a5=_0x3064a5-0x0;var _0x205335=_0x6a3c[_0x3064a5];return _0x205335;};'use strict';var _=require(_0xc6a3('0x0'));var util=require('util');var moment=require(_0xc6a3('0x1'));var BPromise=require('bluebird');var rs=require(_0xc6a3('0x2'));var fs=require('fs');var Redis=require(_0xc6a3('0x3'));var db=require(_0xc6a3('0x4'))['db'];var utils=require(_0xc6a3('0x5'));var logger=require(_0xc6a3('0x6'))(_0xc6a3('0x7'));var config=require(_0xc6a3('0x8'));var jayson=require(_0xc6a3('0x9'));var client=jayson[_0xc6a3('0xa')][_0xc6a3('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4dc46e,_0x5a1786,_0x37256e){return new BPromise(function(_0x2c60e4,_0x50487f){return client[_0xc6a3('0xc')](_0x4dc46e,_0x37256e)[_0xc6a3('0xd')](function(_0x31001e){logger[_0xc6a3('0xe')](_0xc6a3('0xf'),_0x5a1786,_0xc6a3('0x10'));logger[_0xc6a3('0x11')](_0xc6a3('0x12'),_0x5a1786,_0xc6a3('0x10'),JSON[_0xc6a3('0x13')](_0x31001e));if(_0x31001e['error']){if(_0x31001e[_0xc6a3('0x14')]['code']===0x1f4){logger[_0xc6a3('0x14')](_0xc6a3('0xf'),_0x5a1786,_0x31001e[_0xc6a3('0x14')]['message']);return _0x50487f(_0x31001e[_0xc6a3('0x14')]['message']);}logger[_0xc6a3('0x14')]('Setting,\x20%s,\x20%s',_0x5a1786,_0x31001e[_0xc6a3('0x14')]['message']);return _0x2c60e4(_0x31001e[_0xc6a3('0x14')]['message']);}else{logger[_0xc6a3('0xe')](_0xc6a3('0xf'),_0x5a1786,_0xc6a3('0x10'));_0x2c60e4(_0x31001e[_0xc6a3('0x15')]['message']);}})[_0xc6a3('0x16')](function(_0x4dbec0){logger[_0xc6a3('0x14')](_0xc6a3('0xf'),_0x5a1786,_0x4dbec0);_0x50487f(_0x4dbec0);});});}exports[_0xc6a3('0x17')]=function(_0x178821){var _0x24c7f7=this;return new Promise(function(_0x2fd6c3,_0x31f83d){return db['Setting'][_0xc6a3('0x18')]({'raw':_0x178821['options']?_0x178821[_0xc6a3('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x178821['options']?_0x178821[_0xc6a3('0x19')][_0xc6a3('0x1a')]||null:null,'attributes':_0x178821[_0xc6a3('0x19')]?_0x178821[_0xc6a3('0x19')][_0xc6a3('0x1b')]||null:null,'include':_0x178821[_0xc6a3('0x19')]?_0x178821['options'][_0xc6a3('0x1c')]?_[_0xc6a3('0x1d')](_0x178821[_0xc6a3('0x19')][_0xc6a3('0x1c')],function(_0x461375){return{'model':db[_0x461375[_0xc6a3('0x1e')]],'as':_0x461375['as'],'attributes':_0x461375[_0xc6a3('0x1b')],'include':_0x461375[_0xc6a3('0x1c')]?_[_0xc6a3('0x1d')](_0x461375[_0xc6a3('0x1c')],function(_0x279d53){return{'model':db[_0x279d53[_0xc6a3('0x1e')]],'as':_0x279d53['as'],'attributes':_0x279d53[_0xc6a3('0x1b')],'include':_0x279d53['include']?_[_0xc6a3('0x1d')](_0x279d53[_0xc6a3('0x1c')],function(_0x21177e){return{'model':db[_0x21177e[_0xc6a3('0x1e')]],'as':_0x21177e['as'],'attributes':_0x21177e[_0xc6a3('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xc6a3('0xd')](function(_0x39925b){logger[_0xc6a3('0xe')](_0xc6a3('0x17'),_0x178821);logger[_0xc6a3('0x11')](_0xc6a3('0x17'),_0x178821,JSON['stringify'](_0x39925b));_0x2fd6c3(_0x39925b);})[_0xc6a3('0x16')](function(_0x1d6cc6){logger['error'](_0xc6a3('0x17'),_0x1d6cc6[_0xc6a3('0x1f')],_0x178821);_0x31f83d(_0x24c7f7['error'](0x1f4,_0x1d6cc6['message']));});});};
\ No newline at end of file
+var _0x48a4=['catch','Setting','options','raw','where','include','map','model','attributes','debug','ShowSetting','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','http','request','then','info','Setting,\x20%s,\x20%s','request\x20sent','stringify','error','message','result'];(function(_0x50a0c2,_0x4befab){var _0x5ebadd=function(_0x3a3342){while(--_0x3a3342){_0x50a0c2['push'](_0x50a0c2['shift']());}};_0x5ebadd(++_0x4befab);}(_0x48a4,0x1be));var _0x448a=function(_0x3e5036,_0x20428f){_0x3e5036=_0x3e5036-0x0;var _0x5a130a=_0x48a4[_0x3e5036];return _0x5a130a;};'use strict';var _=require(_0x448a('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x448a('0x1'));var rs=require(_0x448a('0x2'));var fs=require('fs');var Redis=require(_0x448a('0x3'));var db=require(_0x448a('0x4'))['db'];var utils=require(_0x448a('0x5'));var logger=require(_0x448a('0x6'))(_0x448a('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x448a('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x53ea8e,_0xc98a99,_0x2cae96){return new BPromise(function(_0x55bacc,_0x7a5946){return client[_0x448a('0x9')](_0x53ea8e,_0x2cae96)[_0x448a('0xa')](function(_0x12ecad){logger[_0x448a('0xb')](_0x448a('0xc'),_0xc98a99,'request\x20sent');logger['debug']('Setting,\x20%s,\x20%s,\x20%s',_0xc98a99,_0x448a('0xd'),JSON[_0x448a('0xe')](_0x12ecad));if(_0x12ecad['error']){if(_0x12ecad[_0x448a('0xf')]['code']===0x1f4){logger[_0x448a('0xf')](_0x448a('0xc'),_0xc98a99,_0x12ecad[_0x448a('0xf')][_0x448a('0x10')]);return _0x7a5946(_0x12ecad[_0x448a('0xf')][_0x448a('0x10')]);}logger[_0x448a('0xf')](_0x448a('0xc'),_0xc98a99,_0x12ecad[_0x448a('0xf')][_0x448a('0x10')]);return _0x55bacc(_0x12ecad['error']['message']);}else{logger[_0x448a('0xb')](_0x448a('0xc'),_0xc98a99,'request\x20sent');_0x55bacc(_0x12ecad[_0x448a('0x11')][_0x448a('0x10')]);}})[_0x448a('0x12')](function(_0x490d51){logger[_0x448a('0xf')](_0x448a('0xc'),_0xc98a99,_0x490d51);_0x7a5946(_0x490d51);});});}exports['ShowSetting']=function(_0x1d6cf0){var _0x319c0b=this;return new Promise(function(_0x16e7fd,_0x426555){return db[_0x448a('0x13')]['find']({'raw':_0x1d6cf0['options']?_0x1d6cf0[_0x448a('0x14')][_0x448a('0x15')]===undefined?!![]:![]:!![],'where':_0x1d6cf0[_0x448a('0x14')]?_0x1d6cf0[_0x448a('0x14')][_0x448a('0x16')]||null:null,'attributes':_0x1d6cf0[_0x448a('0x14')]?_0x1d6cf0['options']['attributes']||null:null,'include':_0x1d6cf0['options']?_0x1d6cf0[_0x448a('0x14')][_0x448a('0x17')]?_[_0x448a('0x18')](_0x1d6cf0[_0x448a('0x14')][_0x448a('0x17')],function(_0x1c191a){return{'model':db[_0x1c191a[_0x448a('0x19')]],'as':_0x1c191a['as'],'attributes':_0x1c191a['attributes'],'include':_0x1c191a[_0x448a('0x17')]?_['map'](_0x1c191a[_0x448a('0x17')],function(_0x118e64){return{'model':db[_0x118e64[_0x448a('0x19')]],'as':_0x118e64['as'],'attributes':_0x118e64['attributes'],'include':_0x118e64[_0x448a('0x17')]?_[_0x448a('0x18')](_0x118e64[_0x448a('0x17')],function(_0x43f139){return{'model':db[_0x43f139[_0x448a('0x19')]],'as':_0x43f139['as'],'attributes':_0x43f139[_0x448a('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x448a('0xa')](function(_0x538a72){logger[_0x448a('0xb')]('ShowSetting',_0x1d6cf0);logger[_0x448a('0x1b')](_0x448a('0x1c'),_0x1d6cf0,JSON[_0x448a('0xe')](_0x538a72));_0x16e7fd(_0x538a72);})[_0x448a('0x12')](function(_0x3e5674){logger[_0x448a('0xf')](_0x448a('0x1c'),_0x3e5674[_0x448a('0x10')],_0x1d6cf0);_0x426555(_0x319c0b[_0x448a('0xf')](0x1f4,_0x3e5674[_0x448a('0x10')]));});});};
\ No newline at end of file