Built motion from commit b4f7ded2.|2.0.69
[motion2.git] / server / api / sound / sound.rpc.js
index 61a7e59..eeb3724 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xffba=['code','Sound,\x20%s,\x20%s','message','catch','ShowSound','Sound','find','options','raw','where','attributes','include','model','map','then','debug','lodash','moment','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','info','request\x20sent','Sound,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x47323b,_0x5781e0){var _0xc31a88=function(_0x1c0769){while(--_0x1c0769){_0x47323b['push'](_0x47323b['shift']());}};_0xc31a88(++_0x5781e0);}(_0xffba,0x1d2));var _0xaffb=function(_0x4c48bf,_0x258296){_0x4c48bf=_0x4c48bf-0x0;var _0x27602f=_0xffba[_0x4c48bf];return _0x27602f;};'use strict';var _=require(_0xaffb('0x0'));var util=require('util');var moment=require(_0xaffb('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var db=require('../../mysqldb')['db'];var utils=require(_0xaffb('0x2'));var logger=require(_0xaffb('0x3'))(_0xaffb('0x4'));var config=require('../../config/environment');var jayson=require(_0xaffb('0x5'));var client=jayson[_0xaffb('0x6')][_0xaffb('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x2fb019,_0x57f31f,_0xd45fa7){return new BPromise(function(_0x2517a6,_0xa59b7c){return client[_0xaffb('0x8')](_0x2fb019,_0xd45fa7)['then'](function(_0x55bdfc){logger[_0xaffb('0x9')]('Sound,\x20%s,\x20%s',_0x57f31f,_0xaffb('0xa'));logger['debug'](_0xaffb('0xb'),_0x57f31f,'request\x20sent',JSON[_0xaffb('0xc')](_0x55bdfc));if(_0x55bdfc[_0xaffb('0xd')]){if(_0x55bdfc[_0xaffb('0xd')][_0xaffb('0xe')]===0x1f4){logger[_0xaffb('0xd')](_0xaffb('0xf'),_0x57f31f,_0x55bdfc['error'][_0xaffb('0x10')]);return _0xa59b7c(_0x55bdfc[_0xaffb('0xd')]['message']);}logger[_0xaffb('0xd')](_0xaffb('0xf'),_0x57f31f,_0x55bdfc[_0xaffb('0xd')][_0xaffb('0x10')]);return _0x2517a6(_0x55bdfc[_0xaffb('0xd')][_0xaffb('0x10')]);}else{logger[_0xaffb('0x9')](_0xaffb('0xf'),_0x57f31f,_0xaffb('0xa'));_0x2517a6(_0x55bdfc['result'][_0xaffb('0x10')]);}})[_0xaffb('0x11')](function(_0x5202b1){logger['error'](_0xaffb('0xf'),_0x57f31f,_0x5202b1);_0xa59b7c(_0x5202b1);});});}exports[_0xaffb('0x12')]=function(_0x34267d){var _0x4a4584=this;return new Promise(function(_0x1ca4d8,_0x31a361){return db[_0xaffb('0x13')][_0xaffb('0x14')]({'raw':_0x34267d[_0xaffb('0x15')]?_0x34267d[_0xaffb('0x15')][_0xaffb('0x16')]===undefined?!![]:![]:!![],'where':_0x34267d['options']?_0x34267d[_0xaffb('0x15')][_0xaffb('0x17')]||null:null,'attributes':_0x34267d[_0xaffb('0x15')]?_0x34267d[_0xaffb('0x15')][_0xaffb('0x18')]||null:null,'include':_0x34267d[_0xaffb('0x15')]?_0x34267d[_0xaffb('0x15')][_0xaffb('0x19')]?_['map'](_0x34267d['options'][_0xaffb('0x19')],function(_0x1964ea){return{'model':db[_0x1964ea[_0xaffb('0x1a')]],'as':_0x1964ea['as'],'attributes':_0x1964ea['attributes'],'include':_0x1964ea[_0xaffb('0x19')]?_['map'](_0x1964ea['include'],function(_0x4da9d7){return{'model':db[_0x4da9d7['model']],'as':_0x4da9d7['as'],'attributes':_0x4da9d7[_0xaffb('0x18')],'include':_0x4da9d7['include']?_[_0xaffb('0x1b')](_0x4da9d7[_0xaffb('0x19')],function(_0xeb69c2){return{'model':db[_0xeb69c2[_0xaffb('0x1a')]],'as':_0xeb69c2['as'],'attributes':_0xeb69c2['attributes']};}):[]};}):[]};}):[]:[]})[_0xaffb('0x1c')](function(_0x312db6){logger['info'](_0xaffb('0x12'),_0x34267d);logger[_0xaffb('0x1d')](_0xaffb('0x12'),_0x34267d,JSON['stringify'](_0x312db6));_0x1ca4d8(_0x312db6);})[_0xaffb('0x11')](function(_0x3320c1){logger[_0xaffb('0xd')](_0xaffb('0x12'),_0x3320c1[_0xaffb('0x10')],_0x34267d);_0x31a361(_0x4a4584[_0xaffb('0xd')](0x1f4,_0x3320c1[_0xaffb('0x10')]));});});};
\ No newline at end of file
+var _0x0c90=['code','message','result','catch','ShowSound','find','options','raw','where','include','model','attributes','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','then','info','Sound,\x20%s,\x20%s','debug','Sound,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0x2ea1d4,_0x34f914){var _0x53ddb7=function(_0x496e68){while(--_0x496e68){_0x2ea1d4['push'](_0x2ea1d4['shift']());}};_0x53ddb7(++_0x34f914);}(_0x0c90,0xde));var _0x00c9=function(_0x2be8c2,_0x14a4b5){_0x2be8c2=_0x2be8c2-0x0;var _0x97f531=_0x0c90[_0x2be8c2];return _0x97f531;};'use strict';var _=require(_0x00c9('0x0'));var util=require(_0x00c9('0x1'));var moment=require('moment');var BPromise=require(_0x00c9('0x2'));var rs=require(_0x00c9('0x3'));var fs=require('fs');var db=require(_0x00c9('0x4'))['db'];var utils=require(_0x00c9('0x5'));var logger=require('../../config/logger')(_0x00c9('0x6'));var config=require(_0x00c9('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x00c9('0x8')][_0x00c9('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1192bc,_0x7b84f4,_0x11aa00){return new BPromise(function(_0x9f331,_0x3751fb){return client['request'](_0x1192bc,_0x11aa00)[_0x00c9('0xa')](function(_0x232118){logger[_0x00c9('0xb')](_0x00c9('0xc'),_0x7b84f4,'request\x20sent');logger[_0x00c9('0xd')](_0x00c9('0xe'),_0x7b84f4,_0x00c9('0xf'),JSON[_0x00c9('0x10')](_0x232118));if(_0x232118[_0x00c9('0x11')]){if(_0x232118[_0x00c9('0x11')][_0x00c9('0x12')]===0x1f4){logger[_0x00c9('0x11')](_0x00c9('0xc'),_0x7b84f4,_0x232118['error'][_0x00c9('0x13')]);return _0x3751fb(_0x232118[_0x00c9('0x11')]['message']);}logger['error'](_0x00c9('0xc'),_0x7b84f4,_0x232118[_0x00c9('0x11')][_0x00c9('0x13')]);return _0x9f331(_0x232118[_0x00c9('0x11')][_0x00c9('0x13')]);}else{logger['info'](_0x00c9('0xc'),_0x7b84f4,_0x00c9('0xf'));_0x9f331(_0x232118[_0x00c9('0x14')]['message']);}})[_0x00c9('0x15')](function(_0x460ec2){logger[_0x00c9('0x11')](_0x00c9('0xc'),_0x7b84f4,_0x460ec2);_0x3751fb(_0x460ec2);});});}exports[_0x00c9('0x16')]=function(_0x23fb34){var _0x27ac77=this;return new Promise(function(_0x2be1a3,_0x5d7e45){return db['Sound'][_0x00c9('0x17')]({'raw':_0x23fb34[_0x00c9('0x18')]?_0x23fb34[_0x00c9('0x18')][_0x00c9('0x19')]===undefined?!![]:![]:!![],'where':_0x23fb34[_0x00c9('0x18')]?_0x23fb34[_0x00c9('0x18')][_0x00c9('0x1a')]||null:null,'attributes':_0x23fb34['options']?_0x23fb34[_0x00c9('0x18')]['attributes']||null:null,'include':_0x23fb34[_0x00c9('0x18')]?_0x23fb34[_0x00c9('0x18')][_0x00c9('0x1b')]?_['map'](_0x23fb34['options']['include'],function(_0x330f2b){return{'model':db[_0x330f2b[_0x00c9('0x1c')]],'as':_0x330f2b['as'],'attributes':_0x330f2b[_0x00c9('0x1d')],'include':_0x330f2b['include']?_['map'](_0x330f2b[_0x00c9('0x1b')],function(_0x466e9c){return{'model':db[_0x466e9c[_0x00c9('0x1c')]],'as':_0x466e9c['as'],'attributes':_0x466e9c[_0x00c9('0x1d')],'include':_0x466e9c[_0x00c9('0x1b')]?_['map'](_0x466e9c['include'],function(_0x556376){return{'model':db[_0x556376[_0x00c9('0x1c')]],'as':_0x556376['as'],'attributes':_0x556376[_0x00c9('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x00c9('0xa')](function(_0x372c82){logger[_0x00c9('0xb')]('ShowSound',_0x23fb34);logger[_0x00c9('0xd')](_0x00c9('0x16'),_0x23fb34,JSON['stringify'](_0x372c82));_0x2be1a3(_0x372c82);})[_0x00c9('0x15')](function(_0x846a7){logger[_0x00c9('0x11')](_0x00c9('0x16'),_0x846a7[_0x00c9('0x13')],_0x23fb34);_0x5d7e45(_0x27ac77[_0x00c9('0x11')](0x1f4,_0x846a7['message']));});});};
\ No newline at end of file