Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / api / setting / setting.rpc.js
index 5ac6708..61f9919 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0c1f=['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','code','message','result','ShowSetting','find','options','raw','where','attributes','include','map','model','catch','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x49282b,_0x4e2125){var _0xcb542e=function(_0x19fb29){while(--_0x19fb29){_0x49282b['push'](_0x49282b['shift']());}};_0xcb542e(++_0x4e2125);}(_0x0c1f,0x1b3));var _0xf0c1=function(_0x2fbedc,_0x25d163){_0x2fbedc=_0x2fbedc-0x0;var _0x56b33e=_0x0c1f[_0x2fbedc];return _0x56b33e;};'use strict';var _=require(_0xf0c1('0x0'));var util=require(_0xf0c1('0x1'));var moment=require(_0xf0c1('0x2'));var BPromise=require(_0xf0c1('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf0c1('0x4'))['db'];var utils=require(_0xf0c1('0x5'));var logger=require(_0xf0c1('0x6'))(_0xf0c1('0x7'));var config=require(_0xf0c1('0x8'));var jayson=require(_0xf0c1('0x9'));var client=jayson[_0xf0c1('0xa')][_0xf0c1('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3a75a6,_0x39fdda,_0xbb13f3){return new BPromise(function(_0x44a05b,_0x4e3485){return client[_0xf0c1('0xc')](_0x3a75a6,_0xbb13f3)[_0xf0c1('0xd')](function(_0x2f60c3){logger[_0xf0c1('0xe')](_0xf0c1('0xf'),_0x39fdda,_0xf0c1('0x10'));logger[_0xf0c1('0x11')](_0xf0c1('0x12'),_0x39fdda,_0xf0c1('0x10'),JSON[_0xf0c1('0x13')](_0x2f60c3));if(_0x2f60c3[_0xf0c1('0x14')]){if(_0x2f60c3[_0xf0c1('0x14')][_0xf0c1('0x15')]===0x1f4){logger[_0xf0c1('0x14')](_0xf0c1('0xf'),_0x39fdda,_0x2f60c3[_0xf0c1('0x14')][_0xf0c1('0x16')]);return _0x4e3485(_0x2f60c3[_0xf0c1('0x14')][_0xf0c1('0x16')]);}logger['error'](_0xf0c1('0xf'),_0x39fdda,_0x2f60c3[_0xf0c1('0x14')][_0xf0c1('0x16')]);return _0x44a05b(_0x2f60c3[_0xf0c1('0x14')][_0xf0c1('0x16')]);}else{logger[_0xf0c1('0xe')]('Setting,\x20%s,\x20%s',_0x39fdda,_0xf0c1('0x10'));_0x44a05b(_0x2f60c3[_0xf0c1('0x17')][_0xf0c1('0x16')]);}})['catch'](function(_0x2964d9){logger[_0xf0c1('0x14')](_0xf0c1('0xf'),_0x39fdda,_0x2964d9);_0x4e3485(_0x2964d9);});});}exports[_0xf0c1('0x18')]=function(_0x292394){var _0x48c4b5=this;return new Promise(function(_0x209bc0,_0x40191d){return db['Setting'][_0xf0c1('0x19')]({'raw':_0x292394[_0xf0c1('0x1a')]?_0x292394[_0xf0c1('0x1a')][_0xf0c1('0x1b')]===undefined?!![]:![]:!![],'where':_0x292394[_0xf0c1('0x1a')]?_0x292394[_0xf0c1('0x1a')][_0xf0c1('0x1c')]||null:null,'attributes':_0x292394['options']?_0x292394[_0xf0c1('0x1a')][_0xf0c1('0x1d')]||null:null,'include':_0x292394[_0xf0c1('0x1a')]?_0x292394['options'][_0xf0c1('0x1e')]?_[_0xf0c1('0x1f')](_0x292394['options'][_0xf0c1('0x1e')],function(_0x21e5ca){return{'model':db[_0x21e5ca['model']],'as':_0x21e5ca['as'],'attributes':_0x21e5ca[_0xf0c1('0x1d')],'include':_0x21e5ca[_0xf0c1('0x1e')]?_[_0xf0c1('0x1f')](_0x21e5ca['include'],function(_0x4d8066){return{'model':db[_0x4d8066[_0xf0c1('0x20')]],'as':_0x4d8066['as'],'attributes':_0x4d8066[_0xf0c1('0x1d')],'include':_0x4d8066['include']?_[_0xf0c1('0x1f')](_0x4d8066[_0xf0c1('0x1e')],function(_0x4ad0ee){return{'model':db[_0x4ad0ee[_0xf0c1('0x20')]],'as':_0x4ad0ee['as'],'attributes':_0x4ad0ee[_0xf0c1('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xf0c1('0xd')](function(_0x4e7ae3){logger[_0xf0c1('0xe')](_0xf0c1('0x18'),_0x292394);logger[_0xf0c1('0x11')](_0xf0c1('0x18'),_0x292394,JSON[_0xf0c1('0x13')](_0x4e7ae3));_0x209bc0(_0x4e7ae3);})[_0xf0c1('0x21')](function(_0x26f9ad){logger[_0xf0c1('0x14')]('ShowSetting',_0x26f9ad[_0xf0c1('0x16')],_0x292394);_0x40191d(_0x48c4b5[_0xf0c1('0x14')](0x1f4,_0x26f9ad[_0xf0c1('0x16')]));});});};
\ No newline at end of file
+var _0x3c0b=['randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','Setting,\x20%s,\x20%s','request\x20sent','debug','Setting,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','ShowSetting','Setting','find','options','raw','where','attributes','map','model','include','info','lodash','util'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x3c0b,0x1de));var _0xb3c0=function(_0x3a3c8a,_0x137e29){_0x3a3c8a=_0x3a3c8a-0x0;var _0x3ab6c2=_0x3c0b[_0x3a3c8a];return _0x3ab6c2;};'use strict';var _=require(_0xb3c0('0x0'));var util=require(_0xb3c0('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xb3c0('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb3c0('0x3'))['db'];var utils=require(_0xb3c0('0x4'));var logger=require(_0xb3c0('0x5'))(_0xb3c0('0x6'));var config=require(_0xb3c0('0x7'));var jayson=require(_0xb3c0('0x8'));var client=jayson[_0xb3c0('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5dd5d3,_0x4adb1e,_0xdae360){return new BPromise(function(_0x83b66a,_0x15d33c){return client[_0xb3c0('0xa')](_0x5dd5d3,_0xdae360)[_0xb3c0('0xb')](function(_0x1ae80c){logger['info'](_0xb3c0('0xc'),_0x4adb1e,_0xb3c0('0xd'));logger[_0xb3c0('0xe')](_0xb3c0('0xf'),_0x4adb1e,_0xb3c0('0xd'),JSON[_0xb3c0('0x10')](_0x1ae80c));if(_0x1ae80c[_0xb3c0('0x11')]){if(_0x1ae80c[_0xb3c0('0x11')]['code']===0x1f4){logger[_0xb3c0('0x11')]('Setting,\x20%s,\x20%s',_0x4adb1e,_0x1ae80c[_0xb3c0('0x11')][_0xb3c0('0x12')]);return _0x15d33c(_0x1ae80c[_0xb3c0('0x11')][_0xb3c0('0x12')]);}logger['error'](_0xb3c0('0xc'),_0x4adb1e,_0x1ae80c[_0xb3c0('0x11')][_0xb3c0('0x12')]);return _0x83b66a(_0x1ae80c[_0xb3c0('0x11')]['message']);}else{logger['info']('Setting,\x20%s,\x20%s',_0x4adb1e,_0xb3c0('0xd'));_0x83b66a(_0x1ae80c[_0xb3c0('0x13')]['message']);}})[_0xb3c0('0x14')](function(_0x1984d9){logger[_0xb3c0('0x11')](_0xb3c0('0xc'),_0x4adb1e,_0x1984d9);_0x15d33c(_0x1984d9);});});}exports[_0xb3c0('0x15')]=function(_0x2d9066){var _0x3cc75d=this;return new Promise(function(_0x3b2b8a,_0x525368){return db[_0xb3c0('0x16')][_0xb3c0('0x17')]({'raw':_0x2d9066[_0xb3c0('0x18')]?_0x2d9066['options'][_0xb3c0('0x19')]===undefined?!![]:![]:!![],'where':_0x2d9066[_0xb3c0('0x18')]?_0x2d9066[_0xb3c0('0x18')][_0xb3c0('0x1a')]||null:null,'attributes':_0x2d9066[_0xb3c0('0x18')]?_0x2d9066[_0xb3c0('0x18')][_0xb3c0('0x1b')]||null:null,'include':_0x2d9066[_0xb3c0('0x18')]?_0x2d9066['options']['include']?_[_0xb3c0('0x1c')](_0x2d9066[_0xb3c0('0x18')]['include'],function(_0x565d81){return{'model':db[_0x565d81[_0xb3c0('0x1d')]],'as':_0x565d81['as'],'attributes':_0x565d81[_0xb3c0('0x1b')],'include':_0x565d81[_0xb3c0('0x1e')]?_[_0xb3c0('0x1c')](_0x565d81[_0xb3c0('0x1e')],function(_0x5dd352){return{'model':db[_0x5dd352[_0xb3c0('0x1d')]],'as':_0x5dd352['as'],'attributes':_0x5dd352[_0xb3c0('0x1b')],'include':_0x5dd352['include']?_[_0xb3c0('0x1c')](_0x5dd352[_0xb3c0('0x1e')],function(_0x2b2c6b){return{'model':db[_0x2b2c6b[_0xb3c0('0x1d')]],'as':_0x2b2c6b['as'],'attributes':_0x2b2c6b[_0xb3c0('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xb3c0('0xb')](function(_0x53dbbe){logger[_0xb3c0('0x1f')](_0xb3c0('0x15'),_0x2d9066);logger['debug']('ShowSetting',_0x2d9066,JSON[_0xb3c0('0x10')](_0x53dbbe));_0x3b2b8a(_0x53dbbe);})[_0xb3c0('0x14')](function(_0x2b7d54){logger[_0xb3c0('0x11')](_0xb3c0('0x15'),_0x2b7d54[_0xb3c0('0x12')],_0x2d9066);_0x525368(_0x3cc75d[_0xb3c0('0x11')](0x1f4,_0x2b7d54[_0xb3c0('0x12')]));});});};
\ No newline at end of file