Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / api / sound / sound.rpc.js
index 400c15f..983de6b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4524=['error','code','message','result','catch','ShowSound','Sound','find','options','raw','attributes','include','map','util','moment','bluebird','randomstring','ioredis','../../config/logger','../../config/environment','jayson/promise','http','request','then','info','Sound,\x20%s,\x20%s','request\x20sent','debug','stringify'];(function(_0xdcd0b2,_0x408fdd){var _0x237780=function(_0x4e1176){while(--_0x4e1176){_0xdcd0b2['push'](_0xdcd0b2['shift']());}};_0x237780(++_0x408fdd);}(_0x4524,0xbb));var _0x4452=function(_0x2a49e8,_0x248a14){_0x2a49e8=_0x2a49e8-0x0;var _0x27e5ff=_0x4524[_0x2a49e8];return _0x27e5ff;};'use strict';var _=require('lodash');var util=require(_0x4452('0x0'));var moment=require(_0x4452('0x1'));var BPromise=require(_0x4452('0x2'));var rs=require(_0x4452('0x3'));var fs=require('fs');var Redis=require(_0x4452('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x4452('0x5'))('rpc');var config=require(_0x4452('0x6'));var jayson=require(_0x4452('0x7'));var client=jayson['client'][_0x4452('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x187ffa,_0x365729,_0x4309e0){return new BPromise(function(_0x10ce78,_0x573518){return client[_0x4452('0x9')](_0x187ffa,_0x4309e0)[_0x4452('0xa')](function(_0x48e824){logger[_0x4452('0xb')](_0x4452('0xc'),_0x365729,_0x4452('0xd'));logger[_0x4452('0xe')]('Sound,\x20%s,\x20%s,\x20%s',_0x365729,_0x4452('0xd'),JSON[_0x4452('0xf')](_0x48e824));if(_0x48e824[_0x4452('0x10')]){if(_0x48e824[_0x4452('0x10')][_0x4452('0x11')]===0x1f4){logger[_0x4452('0x10')](_0x4452('0xc'),_0x365729,_0x48e824['error']['message']);return _0x573518(_0x48e824[_0x4452('0x10')][_0x4452('0x12')]);}logger['error'](_0x4452('0xc'),_0x365729,_0x48e824[_0x4452('0x10')]['message']);return _0x10ce78(_0x48e824['error']['message']);}else{logger[_0x4452('0xb')](_0x4452('0xc'),_0x365729,_0x4452('0xd'));_0x10ce78(_0x48e824[_0x4452('0x13')]['message']);}})[_0x4452('0x14')](function(_0x4743bd){logger[_0x4452('0x10')](_0x4452('0xc'),_0x365729,_0x4743bd);_0x573518(_0x4743bd);});});}exports[_0x4452('0x15')]=function(_0x11f661){var _0x5c6c8a=this;return new Promise(function(_0x1f66eb,_0x3cb27f){return db[_0x4452('0x16')][_0x4452('0x17')]({'raw':_0x11f661[_0x4452('0x18')]?_0x11f661[_0x4452('0x18')][_0x4452('0x19')]===undefined?!![]:![]:!![],'where':_0x11f661[_0x4452('0x18')]?_0x11f661[_0x4452('0x18')]['where']||null:null,'attributes':_0x11f661[_0x4452('0x18')]?_0x11f661[_0x4452('0x18')][_0x4452('0x1a')]||null:null,'include':_0x11f661[_0x4452('0x18')]?_0x11f661[_0x4452('0x18')]['include']?_['map'](_0x11f661[_0x4452('0x18')]['include'],function(_0x37b93e){return{'model':db[_0x37b93e['model']],'as':_0x37b93e['as'],'attributes':_0x37b93e[_0x4452('0x1a')],'include':_0x37b93e[_0x4452('0x1b')]?_[_0x4452('0x1c')](_0x37b93e[_0x4452('0x1b')],function(_0x37e85d){return{'model':db[_0x37e85d['model']],'as':_0x37e85d['as'],'attributes':_0x37e85d['attributes'],'include':_0x37e85d[_0x4452('0x1b')]?_[_0x4452('0x1c')](_0x37e85d[_0x4452('0x1b')],function(_0x45765d){return{'model':db[_0x45765d['model']],'as':_0x45765d['as'],'attributes':_0x45765d['attributes']};}):[]};}):[]};}):[]:[]})[_0x4452('0xa')](function(_0x3ead80){logger['info'](_0x4452('0x15'),_0x11f661);logger[_0x4452('0xe')](_0x4452('0x15'),_0x11f661,JSON[_0x4452('0xf')](_0x3ead80));_0x1f66eb(_0x3ead80);})[_0x4452('0x14')](function(_0x24ce72){logger['error'](_0x4452('0x15'),_0x24ce72[_0x4452('0x12')],_0x11f661);_0x3cb27f(_0x5c6c8a[_0x4452('0x10')](0x1f4,_0x24ce72[_0x4452('0x12')]));});});};
\ No newline at end of file
+var _0x589a=['catch','lodash','moment','randomstring','ioredis','../../config/utils','jayson/promise','http','request','then','info','Sound,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','ShowSound','Sound','find','options','raw','where','attributes','include','model','map'];(function(_0x86c6cb,_0x30bb53){var _0x1b1592=function(_0x19e1c9){while(--_0x19e1c9){_0x86c6cb['push'](_0x86c6cb['shift']());}};_0x1b1592(++_0x30bb53);}(_0x589a,0x1e7));var _0xa589=function(_0x25cfe3,_0xd13431){_0x25cfe3=_0x25cfe3-0x0;var _0x4f9f02=_0x589a[_0x25cfe3];return _0x4f9f02;};'use strict';var _=require(_0xa589('0x0'));var util=require('util');var moment=require(_0xa589('0x1'));var BPromise=require('bluebird');var rs=require(_0xa589('0x2'));var fs=require('fs');var Redis=require(_0xa589('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xa589('0x4'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0xa589('0x5'));var client=jayson['client'][_0xa589('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x2eaaaf,_0x5142f6,_0x12bd4f){return new BPromise(function(_0x1e657f,_0x2466b6){return client[_0xa589('0x7')](_0x2eaaaf,_0x12bd4f)[_0xa589('0x8')](function(_0x1d3db1){logger[_0xa589('0x9')](_0xa589('0xa'),_0x5142f6,_0xa589('0xb'));logger[_0xa589('0xc')]('Sound,\x20%s,\x20%s,\x20%s',_0x5142f6,_0xa589('0xb'),JSON[_0xa589('0xd')](_0x1d3db1));if(_0x1d3db1[_0xa589('0xe')]){if(_0x1d3db1[_0xa589('0xe')]['code']===0x1f4){logger[_0xa589('0xe')](_0xa589('0xa'),_0x5142f6,_0x1d3db1[_0xa589('0xe')][_0xa589('0xf')]);return _0x2466b6(_0x1d3db1['error'][_0xa589('0xf')]);}logger[_0xa589('0xe')](_0xa589('0xa'),_0x5142f6,_0x1d3db1['error'][_0xa589('0xf')]);return _0x1e657f(_0x1d3db1[_0xa589('0xe')]['message']);}else{logger['info']('Sound,\x20%s,\x20%s',_0x5142f6,_0xa589('0xb'));_0x1e657f(_0x1d3db1['result'][_0xa589('0xf')]);}})['catch'](function(_0x29be28){logger[_0xa589('0xe')](_0xa589('0xa'),_0x5142f6,_0x29be28);_0x2466b6(_0x29be28);});});}exports[_0xa589('0x10')]=function(_0x5e7b43){var _0x421005=this;return new Promise(function(_0x28da36,_0x22199e){return db[_0xa589('0x11')][_0xa589('0x12')]({'raw':_0x5e7b43['options']?_0x5e7b43[_0xa589('0x13')][_0xa589('0x14')]===undefined?!![]:![]:!![],'where':_0x5e7b43[_0xa589('0x13')]?_0x5e7b43[_0xa589('0x13')][_0xa589('0x15')]||null:null,'attributes':_0x5e7b43[_0xa589('0x13')]?_0x5e7b43[_0xa589('0x13')][_0xa589('0x16')]||null:null,'include':_0x5e7b43['options']?_0x5e7b43[_0xa589('0x13')]['include']?_['map'](_0x5e7b43['options'][_0xa589('0x17')],function(_0x3867ea){return{'model':db[_0x3867ea[_0xa589('0x18')]],'as':_0x3867ea['as'],'attributes':_0x3867ea[_0xa589('0x16')],'include':_0x3867ea[_0xa589('0x17')]?_['map'](_0x3867ea[_0xa589('0x17')],function(_0x29e010){return{'model':db[_0x29e010[_0xa589('0x18')]],'as':_0x29e010['as'],'attributes':_0x29e010[_0xa589('0x16')],'include':_0x29e010['include']?_[_0xa589('0x19')](_0x29e010[_0xa589('0x17')],function(_0x26a911){return{'model':db[_0x26a911[_0xa589('0x18')]],'as':_0x26a911['as'],'attributes':_0x26a911[_0xa589('0x16')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1cca89){logger[_0xa589('0x9')](_0xa589('0x10'),_0x5e7b43);logger[_0xa589('0xc')](_0xa589('0x10'),_0x5e7b43,JSON[_0xa589('0xd')](_0x1cca89));_0x28da36(_0x1cca89);})[_0xa589('0x1a')](function(_0xb67f6a){logger[_0xa589('0xe')]('ShowSound',_0xb67f6a['message'],_0x5e7b43);_0x22199e(_0x421005[_0xa589('0xe')](0x1f4,_0xb67f6a[_0xa589('0xf')]));});});};
\ No newline at end of file