Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / sound / sound.rpc.js
index 089d124..61bd000 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3de5=['info','Sound,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','Sound,\x20%s,\x20%s','message','result','ShowSound','find','options','raw','where','map','include','attributes','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','then'];(function(_0xf6bb7d,_0x8af4f5){var _0x132764=function(_0x4f6309){while(--_0x4f6309){_0xf6bb7d['push'](_0xf6bb7d['shift']());}};_0x132764(++_0x8af4f5);}(_0x3de5,0x102));var _0x53de=function(_0x221f37,_0x17904c){_0x221f37=_0x221f37-0x0;var _0x237985=_0x3de5[_0x221f37];return _0x237985;};'use strict';var _=require(_0x53de('0x0'));var util=require('util');var moment=require(_0x53de('0x1'));var BPromise=require(_0x53de('0x2'));var rs=require(_0x53de('0x3'));var fs=require('fs');var Redis=require(_0x53de('0x4'));var db=require(_0x53de('0x5'))['db'];var utils=require(_0x53de('0x6'));var logger=require(_0x53de('0x7'))(_0x53de('0x8'));var config=require('../../config/environment');var jayson=require(_0x53de('0x9'));var client=jayson['client'][_0x53de('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3e3e9f,_0x1dbf1c,_0x5928dc){return new BPromise(function(_0x4e015c,_0xd5b1fc){return client['request'](_0x3e3e9f,_0x5928dc)[_0x53de('0xb')](function(_0x409c79){logger[_0x53de('0xc')]('Sound,\x20%s,\x20%s',_0x1dbf1c,'request\x20sent');logger['debug'](_0x53de('0xd'),_0x1dbf1c,_0x53de('0xe'),JSON[_0x53de('0xf')](_0x409c79));if(_0x409c79['error']){if(_0x409c79[_0x53de('0x10')][_0x53de('0x11')]===0x1f4){logger[_0x53de('0x10')](_0x53de('0x12'),_0x1dbf1c,_0x409c79[_0x53de('0x10')][_0x53de('0x13')]);return _0xd5b1fc(_0x409c79[_0x53de('0x10')][_0x53de('0x13')]);}logger[_0x53de('0x10')]('Sound,\x20%s,\x20%s',_0x1dbf1c,_0x409c79[_0x53de('0x10')][_0x53de('0x13')]);return _0x4e015c(_0x409c79[_0x53de('0x10')][_0x53de('0x13')]);}else{logger[_0x53de('0xc')]('Sound,\x20%s,\x20%s',_0x1dbf1c,_0x53de('0xe'));_0x4e015c(_0x409c79[_0x53de('0x14')][_0x53de('0x13')]);}})['catch'](function(_0x57a681){logger['error'](_0x53de('0x12'),_0x1dbf1c,_0x57a681);_0xd5b1fc(_0x57a681);});});}exports[_0x53de('0x15')]=function(_0x11b552){var _0x2738e9=this;return new Promise(function(_0x73246,_0x80a900){return db['Sound'][_0x53de('0x16')]({'raw':_0x11b552[_0x53de('0x17')]?_0x11b552[_0x53de('0x17')][_0x53de('0x18')]===undefined?!![]:![]:!![],'where':_0x11b552[_0x53de('0x17')]?_0x11b552[_0x53de('0x17')][_0x53de('0x19')]||null:null,'attributes':_0x11b552[_0x53de('0x17')]?_0x11b552['options']['attributes']||null:null,'include':_0x11b552['options']?_0x11b552['options']['include']?_[_0x53de('0x1a')](_0x11b552[_0x53de('0x17')]['include'],function(_0x455fd9){return{'model':db[_0x455fd9['model']],'as':_0x455fd9['as'],'attributes':_0x455fd9['attributes'],'include':_0x455fd9['include']?_[_0x53de('0x1a')](_0x455fd9[_0x53de('0x1b')],function(_0x24b38e){return{'model':db[_0x24b38e['model']],'as':_0x24b38e['as'],'attributes':_0x24b38e['attributes'],'include':_0x24b38e[_0x53de('0x1b')]?_[_0x53de('0x1a')](_0x24b38e[_0x53de('0x1b')],function(_0x2c9e19){return{'model':db[_0x2c9e19['model']],'as':_0x2c9e19['as'],'attributes':_0x2c9e19[_0x53de('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x53de('0xb')](function(_0x4b4fc7){logger[_0x53de('0xc')](_0x53de('0x15'),_0x11b552);logger['debug'](_0x53de('0x15'),_0x11b552,JSON[_0x53de('0xf')](_0x4b4fc7));_0x73246(_0x4b4fc7);})[_0x53de('0x1d')](function(_0x5ae57b){logger[_0x53de('0x10')]('ShowSound',_0x5ae57b['message'],_0x11b552);_0x80a900(_0x2738e9[_0x53de('0x10')](0x1f4,_0x5ae57b['message']));});});};
\ No newline at end of file
+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