Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / api / sound / sound.rpc.js
index 61bd000..722ca0c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x194a=['http','request','info','Sound,\x20%s,\x20%s','debug','Sound,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','catch','options','raw','where','attributes','include','map','model','then','ShowSound','stringify','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x3020fc,_0x242d93){var _0x304235=function(_0x284dd1){while(--_0x284dd1){_0x3020fc['push'](_0x3020fc['shift']());}};_0x304235(++_0x242d93);}(_0x194a,0xaa));var _0xa194=function(_0x5a2285,_0x3212d1){_0x5a2285=_0x5a2285-0x0;var _0x48f6ed=_0x194a[_0x5a2285];return _0x48f6ed;};'use strict';var _=require(_0xa194('0x0'));var util=require(_0xa194('0x1'));var moment=require(_0xa194('0x2'));var BPromise=require(_0xa194('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa194('0x4'))['db'];var utils=require(_0xa194('0x5'));var logger=require(_0xa194('0x6'))(_0xa194('0x7'));var config=require(_0xa194('0x8'));var jayson=require(_0xa194('0x9'));var client=jayson['client'][_0xa194('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2a5d78,_0x1298e,_0x1509c0){return new BPromise(function(_0x1f17c8,_0x42347d){return client[_0xa194('0xb')](_0x2a5d78,_0x1509c0)['then'](function(_0x19b1c8){logger[_0xa194('0xc')](_0xa194('0xd'),_0x1298e,'request\x20sent');logger[_0xa194('0xe')](_0xa194('0xf'),_0x1298e,_0xa194('0x10'),JSON['stringify'](_0x19b1c8));if(_0x19b1c8[_0xa194('0x11')]){if(_0x19b1c8[_0xa194('0x11')]['code']===0x1f4){logger['error'](_0xa194('0xd'),_0x1298e,_0x19b1c8[_0xa194('0x11')][_0xa194('0x12')]);return _0x42347d(_0x19b1c8[_0xa194('0x11')][_0xa194('0x12')]);}logger['error'](_0xa194('0xd'),_0x1298e,_0x19b1c8['error'][_0xa194('0x12')]);return _0x1f17c8(_0x19b1c8[_0xa194('0x11')][_0xa194('0x12')]);}else{logger[_0xa194('0xc')](_0xa194('0xd'),_0x1298e,'request\x20sent');_0x1f17c8(_0x19b1c8['result'][_0xa194('0x12')]);}})[_0xa194('0x13')](function(_0x5cc726){logger[_0xa194('0x11')](_0xa194('0xd'),_0x1298e,_0x5cc726);_0x42347d(_0x5cc726);});});}exports['ShowSound']=function(_0x52c534){var _0x261386=this;return new Promise(function(_0x2f0a13,_0x4d76ee){return db['Sound']['find']({'raw':_0x52c534['options']?_0x52c534[_0xa194('0x14')][_0xa194('0x15')]===undefined?!![]:![]:!![],'where':_0x52c534[_0xa194('0x14')]?_0x52c534[_0xa194('0x14')][_0xa194('0x16')]||null:null,'attributes':_0x52c534[_0xa194('0x14')]?_0x52c534[_0xa194('0x14')][_0xa194('0x17')]||null:null,'include':_0x52c534[_0xa194('0x14')]?_0x52c534[_0xa194('0x14')][_0xa194('0x18')]?_[_0xa194('0x19')](_0x52c534[_0xa194('0x14')]['include'],function(_0x1c583b){return{'model':db[_0x1c583b[_0xa194('0x1a')]],'as':_0x1c583b['as'],'attributes':_0x1c583b[_0xa194('0x17')],'include':_0x1c583b['include']?_[_0xa194('0x19')](_0x1c583b[_0xa194('0x18')],function(_0x3522ab){return{'model':db[_0x3522ab[_0xa194('0x1a')]],'as':_0x3522ab['as'],'attributes':_0x3522ab['attributes'],'include':_0x3522ab[_0xa194('0x18')]?_[_0xa194('0x19')](_0x3522ab[_0xa194('0x18')],function(_0x4efde5){return{'model':db[_0x4efde5[_0xa194('0x1a')]],'as':_0x4efde5['as'],'attributes':_0x4efde5['attributes']};}):[]};}):[]};}):[]:[]})[_0xa194('0x1b')](function(_0x379e1c){logger[_0xa194('0xc')](_0xa194('0x1c'),_0x52c534);logger[_0xa194('0xe')](_0xa194('0x1c'),_0x52c534,JSON[_0xa194('0x1d')](_0x379e1c));_0x2f0a13(_0x379e1c);})[_0xa194('0x13')](function(_0x4140bc){logger[_0xa194('0x11')]('ShowSound',_0x4140bc[_0xa194('0x12')],_0x52c534);_0x4d76ee(_0x261386[_0xa194('0x11')](0x1f4,_0x4140bc[_0xa194('0x12')]));});});};
\ No newline at end of file
+var _0xcbb6=['debug','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','Sound,\x20%s,\x20%s','request\x20sent','Sound,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','find','options','raw','attributes','include','map','model','ShowSound'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xcbb6,0xda));var _0x6cbb=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xcbb6[_0xa464c9];return _0x3d73c4;};'use strict';var _=require(_0x6cbb('0x0'));var util=require(_0x6cbb('0x1'));var moment=require(_0x6cbb('0x2'));var BPromise=require(_0x6cbb('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6cbb('0x4'));var db=require(_0x6cbb('0x5'))['db'];var utils=require(_0x6cbb('0x6'));var logger=require(_0x6cbb('0x7'))(_0x6cbb('0x8'));var config=require('../../config/environment');var jayson=require(_0x6cbb('0x9'));var client=jayson[_0x6cbb('0xa')][_0x6cbb('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x126c73,_0x4928d9,_0x4b2bce){return new BPromise(function(_0x4c9f46,_0x1ed6d3){return client[_0x6cbb('0xc')](_0x126c73,_0x4b2bce)[_0x6cbb('0xd')](function(_0x240f1d){logger[_0x6cbb('0xe')](_0x6cbb('0xf'),_0x4928d9,_0x6cbb('0x10'));logger['debug'](_0x6cbb('0x11'),_0x4928d9,'request\x20sent',JSON[_0x6cbb('0x12')](_0x240f1d));if(_0x240f1d[_0x6cbb('0x13')]){if(_0x240f1d[_0x6cbb('0x13')]['code']===0x1f4){logger[_0x6cbb('0x13')](_0x6cbb('0xf'),_0x4928d9,_0x240f1d['error'][_0x6cbb('0x14')]);return _0x1ed6d3(_0x240f1d[_0x6cbb('0x13')]['message']);}logger[_0x6cbb('0x13')](_0x6cbb('0xf'),_0x4928d9,_0x240f1d['error'][_0x6cbb('0x14')]);return _0x4c9f46(_0x240f1d[_0x6cbb('0x13')][_0x6cbb('0x14')]);}else{logger['info']('Sound,\x20%s,\x20%s',_0x4928d9,_0x6cbb('0x10'));_0x4c9f46(_0x240f1d['result'][_0x6cbb('0x14')]);}})[_0x6cbb('0x15')](function(_0x304a04){logger['error'](_0x6cbb('0xf'),_0x4928d9,_0x304a04);_0x1ed6d3(_0x304a04);});});}exports['ShowSound']=function(_0xfd120e){var _0x42d809=this;return new Promise(function(_0x586698,_0xf37653){return db['Sound'][_0x6cbb('0x16')]({'raw':_0xfd120e['options']?_0xfd120e[_0x6cbb('0x17')][_0x6cbb('0x18')]===undefined?!![]:![]:!![],'where':_0xfd120e[_0x6cbb('0x17')]?_0xfd120e['options']['where']||null:null,'attributes':_0xfd120e['options']?_0xfd120e[_0x6cbb('0x17')][_0x6cbb('0x19')]||null:null,'include':_0xfd120e[_0x6cbb('0x17')]?_0xfd120e['options'][_0x6cbb('0x1a')]?_[_0x6cbb('0x1b')](_0xfd120e[_0x6cbb('0x17')][_0x6cbb('0x1a')],function(_0x4ae200){return{'model':db[_0x4ae200['model']],'as':_0x4ae200['as'],'attributes':_0x4ae200['attributes'],'include':_0x4ae200[_0x6cbb('0x1a')]?_[_0x6cbb('0x1b')](_0x4ae200[_0x6cbb('0x1a')],function(_0x394ad0){return{'model':db[_0x394ad0[_0x6cbb('0x1c')]],'as':_0x394ad0['as'],'attributes':_0x394ad0[_0x6cbb('0x19')],'include':_0x394ad0[_0x6cbb('0x1a')]?_[_0x6cbb('0x1b')](_0x394ad0[_0x6cbb('0x1a')],function(_0x177216){return{'model':db[_0x177216[_0x6cbb('0x1c')]],'as':_0x177216['as'],'attributes':_0x177216['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x18fd20){logger[_0x6cbb('0xe')](_0x6cbb('0x1d'),_0xfd120e);logger[_0x6cbb('0x1e')](_0x6cbb('0x1d'),_0xfd120e,JSON['stringify'](_0x18fd20));_0x586698(_0x18fd20);})[_0x6cbb('0x15')](function(_0x17737f){logger['error'](_0x6cbb('0x1d'),_0x17737f[_0x6cbb('0x14')],_0xfd120e);_0xf37653(_0x42d809[_0x6cbb('0x13')](0x1f4,_0x17737f['message']));});});};
\ No newline at end of file