Built motion from commit 08fb8613.|2.6.31
[motion2.git] / server / api / setting / setting.rpc.js
index 77f6b15..869015c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x549f=['util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','then','info','Setting,\x20%s,\x20%s','debug','Setting,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','ShowSetting','Setting','find','options','raw','where','attributes','map','include','model','lodash'];(function(_0x518657,_0x33d293){var _0x1b1f4f=function(_0x11b7f8){while(--_0x11b7f8){_0x518657['push'](_0x518657['shift']());}};_0x1b1f4f(++_0x33d293);}(_0x549f,0x175));var _0xf549=function(_0x36345a,_0x39d23e){_0x36345a=_0x36345a-0x0;var _0x1c5d9a=_0x549f[_0x36345a];return _0x1c5d9a;};'use strict';var _=require(_0xf549('0x0'));var util=require(_0xf549('0x1'));var moment=require(_0xf549('0x2'));var BPromise=require(_0xf549('0x3'));var rs=require(_0xf549('0x4'));var fs=require('fs');var Redis=require(_0xf549('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xf549('0x6'));var logger=require(_0xf549('0x7'))(_0xf549('0x8'));var config=require('../../config/environment');var jayson=require(_0xf549('0x9'));var client=jayson[_0xf549('0xa')][_0xf549('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x219c9a,_0x2e373d,_0x5cfdac){return new BPromise(function(_0x4475a3,_0x541b86){return client['request'](_0x219c9a,_0x5cfdac)[_0xf549('0xc')](function(_0x4cf074){logger[_0xf549('0xd')](_0xf549('0xe'),_0x2e373d,'request\x20sent');logger[_0xf549('0xf')](_0xf549('0x10'),_0x2e373d,_0xf549('0x11'),JSON[_0xf549('0x12')](_0x4cf074));if(_0x4cf074[_0xf549('0x13')]){if(_0x4cf074['error'][_0xf549('0x14')]===0x1f4){logger[_0xf549('0x13')]('Setting,\x20%s,\x20%s',_0x2e373d,_0x4cf074['error'][_0xf549('0x15')]);return _0x541b86(_0x4cf074[_0xf549('0x13')][_0xf549('0x15')]);}logger[_0xf549('0x13')]('Setting,\x20%s,\x20%s',_0x2e373d,_0x4cf074[_0xf549('0x13')][_0xf549('0x15')]);return _0x4475a3(_0x4cf074[_0xf549('0x13')][_0xf549('0x15')]);}else{logger[_0xf549('0xd')](_0xf549('0xe'),_0x2e373d,_0xf549('0x11'));_0x4475a3(_0x4cf074[_0xf549('0x16')][_0xf549('0x15')]);}})[_0xf549('0x17')](function(_0x3118c5){logger['error'](_0xf549('0xe'),_0x2e373d,_0x3118c5);_0x541b86(_0x3118c5);});});}exports[_0xf549('0x18')]=function(_0x1cfab9){var _0x10d95a=this;return new Promise(function(_0x3f361e,_0xb2c2f0){return db[_0xf549('0x19')][_0xf549('0x1a')]({'raw':_0x1cfab9[_0xf549('0x1b')]?_0x1cfab9[_0xf549('0x1b')][_0xf549('0x1c')]===undefined?!![]:![]:!![],'where':_0x1cfab9[_0xf549('0x1b')]?_0x1cfab9[_0xf549('0x1b')][_0xf549('0x1d')]||null:null,'attributes':_0x1cfab9['options']?_0x1cfab9['options'][_0xf549('0x1e')]||null:null,'include':_0x1cfab9[_0xf549('0x1b')]?_0x1cfab9[_0xf549('0x1b')]['include']?_[_0xf549('0x1f')](_0x1cfab9[_0xf549('0x1b')][_0xf549('0x20')],function(_0x211145){return{'model':db[_0x211145[_0xf549('0x21')]],'as':_0x211145['as'],'attributes':_0x211145[_0xf549('0x1e')],'include':_0x211145[_0xf549('0x20')]?_[_0xf549('0x1f')](_0x211145[_0xf549('0x20')],function(_0xf989a){return{'model':db[_0xf989a[_0xf549('0x21')]],'as':_0xf989a['as'],'attributes':_0xf989a[_0xf549('0x1e')],'include':_0xf989a['include']?_[_0xf549('0x1f')](_0xf989a[_0xf549('0x20')],function(_0x4f964a){return{'model':db[_0x4f964a[_0xf549('0x21')]],'as':_0x4f964a['as'],'attributes':_0x4f964a[_0xf549('0x1e')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2e9a5){logger[_0xf549('0xd')](_0xf549('0x18'),_0x1cfab9);logger['debug'](_0xf549('0x18'),_0x1cfab9,JSON[_0xf549('0x12')](_0x2e9a5));_0x3f361e(_0x2e9a5);})[_0xf549('0x17')](function(_0x424389){logger['error'](_0xf549('0x18'),_0x424389['message'],_0x1cfab9);_0xb2c2f0(_0x10d95a[_0xf549('0x13')](0x1f4,_0x424389[_0xf549('0x15')]));});});};
\ No newline at end of file
+var _0xa9ce=['where','attributes','include','map','model','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','stringify','error','code','Setting,\x20%s,\x20%s','message','catch','ShowSetting','Setting','options','raw'];(function(_0x3f103f,_0x36cbcd){var _0x498db5=function(_0x9dd180){while(--_0x9dd180){_0x3f103f['push'](_0x3f103f['shift']());}};_0x498db5(++_0x36cbcd);}(_0xa9ce,0xc5));var _0xea9c=function(_0xb4fe2c,_0x3d2be6){_0xb4fe2c=_0xb4fe2c-0x0;var _0x460a1a=_0xa9ce[_0xb4fe2c];return _0x460a1a;};'use strict';var _=require(_0xea9c('0x0'));var util=require(_0xea9c('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xea9c('0x2'));var fs=require('fs');var Redis=require(_0xea9c('0x3'));var db=require(_0xea9c('0x4'))['db'];var utils=require(_0xea9c('0x5'));var logger=require(_0xea9c('0x6'))(_0xea9c('0x7'));var config=require(_0xea9c('0x8'));var jayson=require(_0xea9c('0x9'));var client=jayson[_0xea9c('0xa')][_0xea9c('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1d9d3f,_0x46ad7a,_0x32ca53){return new BPromise(function(_0x296ee,_0x26d97c){return client[_0xea9c('0xc')](_0x1d9d3f,_0x32ca53)[_0xea9c('0xd')](function(_0x1996ff){logger[_0xea9c('0xe')]('Setting,\x20%s,\x20%s',_0x46ad7a,_0xea9c('0xf'));logger[_0xea9c('0x10')]('Setting,\x20%s,\x20%s,\x20%s',_0x46ad7a,'request\x20sent',JSON[_0xea9c('0x11')](_0x1996ff));if(_0x1996ff[_0xea9c('0x12')]){if(_0x1996ff[_0xea9c('0x12')][_0xea9c('0x13')]===0x1f4){logger[_0xea9c('0x12')](_0xea9c('0x14'),_0x46ad7a,_0x1996ff[_0xea9c('0x12')][_0xea9c('0x15')]);return _0x26d97c(_0x1996ff[_0xea9c('0x12')][_0xea9c('0x15')]);}logger['error']('Setting,\x20%s,\x20%s',_0x46ad7a,_0x1996ff[_0xea9c('0x12')][_0xea9c('0x15')]);return _0x296ee(_0x1996ff[_0xea9c('0x12')][_0xea9c('0x15')]);}else{logger[_0xea9c('0xe')](_0xea9c('0x14'),_0x46ad7a,_0xea9c('0xf'));_0x296ee(_0x1996ff['result'][_0xea9c('0x15')]);}})[_0xea9c('0x16')](function(_0x274c2d){logger[_0xea9c('0x12')]('Setting,\x20%s,\x20%s',_0x46ad7a,_0x274c2d);_0x26d97c(_0x274c2d);});});}exports[_0xea9c('0x17')]=function(_0x1a25e9){var _0x252174=this;return new Promise(function(_0x395a86,_0x40bce1){return db[_0xea9c('0x18')]['find']({'raw':_0x1a25e9[_0xea9c('0x19')]?_0x1a25e9[_0xea9c('0x19')][_0xea9c('0x1a')]===undefined?!![]:![]:!![],'where':_0x1a25e9[_0xea9c('0x19')]?_0x1a25e9['options'][_0xea9c('0x1b')]||null:null,'attributes':_0x1a25e9[_0xea9c('0x19')]?_0x1a25e9[_0xea9c('0x19')][_0xea9c('0x1c')]||null:null,'include':_0x1a25e9[_0xea9c('0x19')]?_0x1a25e9[_0xea9c('0x19')][_0xea9c('0x1d')]?_[_0xea9c('0x1e')](_0x1a25e9[_0xea9c('0x19')][_0xea9c('0x1d')],function(_0x3d3024){return{'model':db[_0x3d3024['model']],'as':_0x3d3024['as'],'attributes':_0x3d3024[_0xea9c('0x1c')],'include':_0x3d3024[_0xea9c('0x1d')]?_[_0xea9c('0x1e')](_0x3d3024[_0xea9c('0x1d')],function(_0x561ae1){return{'model':db[_0x561ae1['model']],'as':_0x561ae1['as'],'attributes':_0x561ae1['attributes'],'include':_0x561ae1[_0xea9c('0x1d')]?_['map'](_0x561ae1[_0xea9c('0x1d')],function(_0x3f8b85){return{'model':db[_0x3f8b85[_0xea9c('0x1f')]],'as':_0x3f8b85['as'],'attributes':_0x3f8b85[_0xea9c('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xea9c('0xd')](function(_0x5bfdab){logger[_0xea9c('0xe')](_0xea9c('0x17'),_0x1a25e9);logger[_0xea9c('0x10')](_0xea9c('0x17'),_0x1a25e9,JSON['stringify'](_0x5bfdab));_0x395a86(_0x5bfdab);})[_0xea9c('0x16')](function(_0x24f7b0){logger[_0xea9c('0x12')](_0xea9c('0x17'),_0x24f7b0[_0xea9c('0x15')],_0x1a25e9);_0x40bce1(_0x252174[_0xea9c('0x12')](0x1f4,_0x24f7b0[_0xea9c('0x15')]));});});};
\ No newline at end of file