Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / api / squareProject / squareProject.rpc.js
index 6330ade..234766b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6de3=['then','debug','stringify','lodash','ioredis','../../config/logger','rpc','../../config/environment','defaults','redis','localhost','socket.io-emitter','register','SquareProject','findAll','options','raw','where','limit','map','include','model','attributes','info','GetSquareProjects','catch','error','message','ShowSquareProject','find'];(function(_0x345a6d,_0x137f9a){var _0x2b4df7=function(_0x20ba5c){while(--_0x20ba5c){_0x345a6d['push'](_0x345a6d['shift']());}};_0x2b4df7(++_0x137f9a);}(_0x6de3,0x16b));var _0x36de=function(_0x376a23,_0x4b8386){_0x376a23=_0x376a23-0x0;var _0x9fa71a=_0x6de3[_0x376a23];return _0x9fa71a;};'use strict';var _=require(_0x36de('0x0'));var Redis=require(_0x36de('0x1'));var db=require('../../mysqldb')['db'];var logger=require(_0x36de('0x2'))(_0x36de('0x3'));var config=require(_0x36de('0x4'));config['redis']=_[_0x36de('0x5')](config[_0x36de('0x6')],{'host':_0x36de('0x7'),'port':0x18eb});var socket=require(_0x36de('0x8'))(new Redis(config['redis']));require('./squareProject.socket')[_0x36de('0x9')](socket);exports['GetSquareProjects']=function(_0x34cf79){var _0x3aaeea=this;return new Promise(function(_0x211def,_0x472362){return db[_0x36de('0xa')][_0x36de('0xb')]({'raw':_0x34cf79[_0x36de('0xc')]?_0x34cf79['options'][_0x36de('0xd')]===undefined?!![]:![]:!![],'where':_0x34cf79['options']?_0x34cf79['options'][_0x36de('0xe')]||null:null,'attributes':_0x34cf79['options']?_0x34cf79[_0x36de('0xc')]['attributes']||null:null,'limit':_0x34cf79['options']?_0x34cf79['options'][_0x36de('0xf')]||null:null,'include':_0x34cf79[_0x36de('0xc')]?_0x34cf79[_0x36de('0xc')]['include']?_[_0x36de('0x10')](_0x34cf79[_0x36de('0xc')][_0x36de('0x11')],function(_0x19a059){return{'model':db[_0x19a059[_0x36de('0x12')]],'as':_0x19a059['as'],'attributes':_0x19a059[_0x36de('0x13')],'include':_0x19a059['include']?_['map'](_0x19a059['include'],function(_0x203c4a){return{'model':db[_0x203c4a['model']],'as':_0x203c4a['as'],'attributes':_0x203c4a[_0x36de('0x13')],'include':_0x203c4a[_0x36de('0x11')]?_['map'](_0x203c4a['include'],function(_0x3e70c1){return{'model':db[_0x3e70c1[_0x36de('0x12')]],'as':_0x3e70c1['as'],'attributes':_0x3e70c1[_0x36de('0x13')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x4e437d){logger[_0x36de('0x14')](_0x36de('0x15'),_0x34cf79);logger['debug'](_0x36de('0x15'),_0x34cf79,JSON['stringify'](_0x4e437d));_0x211def(_0x4e437d);})[_0x36de('0x16')](function(_0x3cef9d){logger[_0x36de('0x17')](_0x36de('0x15'),_0x3cef9d[_0x36de('0x18')],_0x34cf79);_0x472362(_0x3aaeea[_0x36de('0x17')](0x1f4,_0x3cef9d['message']));});});};exports[_0x36de('0x19')]=function(_0x277a67){var _0x2b733f=this;return new Promise(function(_0x1dd3bd,_0x5cead3){return db[_0x36de('0xa')][_0x36de('0x1a')]({'raw':_0x277a67[_0x36de('0xc')]?_0x277a67[_0x36de('0xc')][_0x36de('0xd')]===undefined?!![]:![]:!![],'where':_0x277a67['options']?_0x277a67['options'][_0x36de('0xe')]||null:null,'attributes':_0x277a67[_0x36de('0xc')]?_0x277a67[_0x36de('0xc')][_0x36de('0x13')]||null:null,'include':_0x277a67[_0x36de('0xc')]?_0x277a67[_0x36de('0xc')][_0x36de('0x11')]?_[_0x36de('0x10')](_0x277a67[_0x36de('0xc')][_0x36de('0x11')],function(_0x4c7362){return{'model':db[_0x4c7362[_0x36de('0x12')]],'as':_0x4c7362['as'],'attributes':_0x4c7362[_0x36de('0x13')],'include':_0x4c7362[_0x36de('0x11')]?_[_0x36de('0x10')](_0x4c7362[_0x36de('0x11')],function(_0x18f3a3){return{'model':db[_0x18f3a3['model']],'as':_0x18f3a3['as'],'attributes':_0x18f3a3['attributes'],'include':_0x18f3a3[_0x36de('0x11')]?_[_0x36de('0x10')](_0x18f3a3['include'],function(_0x27aa89){return{'model':db[_0x27aa89[_0x36de('0x12')]],'as':_0x27aa89['as'],'attributes':_0x27aa89[_0x36de('0x13')]};}):[]};}):[]};}):[]:[]})[_0x36de('0x1b')](function(_0x41fb65){logger[_0x36de('0x14')](_0x36de('0x19'),_0x277a67);logger[_0x36de('0x1c')](_0x36de('0x19'),_0x277a67,JSON[_0x36de('0x1d')](_0x41fb65));_0x1dd3bd(_0x41fb65);})[_0x36de('0x16')](function(_0x5445f0){logger['error'](_0x36de('0x19'),_0x5445f0[_0x36de('0x18')],_0x277a67);_0x5cead3(_0x2b733f[_0x36de('0x17')](0x1f4,_0x5445f0[_0x36de('0x18')]));});});};
\ No newline at end of file
+var _0xb1f5=['./squareProject.socket','register','GetSquareProjects','SquareProject','options','raw','where','attributes','limit','include','model','map','then','info','debug','stringify','catch','error','ShowSquareProject','find','message','lodash','ioredis','rpc','../../config/environment','redis','localhost','socket.io-emitter'];(function(_0xce44ee,_0x387d70){var _0xf97a49=function(_0x3ceab0){while(--_0x3ceab0){_0xce44ee['push'](_0xce44ee['shift']());}};_0xf97a49(++_0x387d70);}(_0xb1f5,0x1f1));var _0x5b1f=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0xb1f5[_0x42cae2];return _0x5f256f;};'use strict';var _=require(_0x5b1f('0x0'));var Redis=require(_0x5b1f('0x1'));var db=require('../../mysqldb')['db'];var logger=require('../../config/logger')(_0x5b1f('0x2'));var config=require(_0x5b1f('0x3'));config[_0x5b1f('0x4')]=_['defaults'](config[_0x5b1f('0x4')],{'host':_0x5b1f('0x5'),'port':0x18eb});var socket=require(_0x5b1f('0x6'))(new Redis(config['redis']));require(_0x5b1f('0x7'))[_0x5b1f('0x8')](socket);exports[_0x5b1f('0x9')]=function(_0x5a76ae){var _0x4d7599=this;return new Promise(function(_0x2b1736,_0x497a38){return db[_0x5b1f('0xa')]['findAll']({'raw':_0x5a76ae['options']?_0x5a76ae[_0x5b1f('0xb')][_0x5b1f('0xc')]===undefined?!![]:![]:!![],'where':_0x5a76ae[_0x5b1f('0xb')]?_0x5a76ae['options'][_0x5b1f('0xd')]||null:null,'attributes':_0x5a76ae[_0x5b1f('0xb')]?_0x5a76ae[_0x5b1f('0xb')][_0x5b1f('0xe')]||null:null,'limit':_0x5a76ae['options']?_0x5a76ae[_0x5b1f('0xb')][_0x5b1f('0xf')]||null:null,'include':_0x5a76ae['options']?_0x5a76ae['options']['include']?_['map'](_0x5a76ae[_0x5b1f('0xb')][_0x5b1f('0x10')],function(_0x2bae04){return{'model':db[_0x2bae04[_0x5b1f('0x11')]],'as':_0x2bae04['as'],'attributes':_0x2bae04[_0x5b1f('0xe')],'include':_0x2bae04['include']?_[_0x5b1f('0x12')](_0x2bae04[_0x5b1f('0x10')],function(_0x5a9d3c){return{'model':db[_0x5a9d3c[_0x5b1f('0x11')]],'as':_0x5a9d3c['as'],'attributes':_0x5a9d3c['attributes'],'include':_0x5a9d3c[_0x5b1f('0x10')]?_[_0x5b1f('0x12')](_0x5a9d3c[_0x5b1f('0x10')],function(_0x38f46e){return{'model':db[_0x38f46e[_0x5b1f('0x11')]],'as':_0x38f46e['as'],'attributes':_0x38f46e[_0x5b1f('0xe')]};}):[]};}):[]};}):[]:[]})[_0x5b1f('0x13')](function(_0x31f2d6){logger[_0x5b1f('0x14')](_0x5b1f('0x9'),_0x5a76ae);logger[_0x5b1f('0x15')](_0x5b1f('0x9'),_0x5a76ae,JSON[_0x5b1f('0x16')](_0x31f2d6));_0x2b1736(_0x31f2d6);})[_0x5b1f('0x17')](function(_0xfe123b){logger[_0x5b1f('0x18')](_0x5b1f('0x9'),_0xfe123b['message'],_0x5a76ae);_0x497a38(_0x4d7599[_0x5b1f('0x18')](0x1f4,_0xfe123b['message']));});});};exports[_0x5b1f('0x19')]=function(_0x2cbda8){var _0xb5129d=this;return new Promise(function(_0x2bd6d5,_0x25b15c){return db[_0x5b1f('0xa')][_0x5b1f('0x1a')]({'raw':_0x2cbda8[_0x5b1f('0xb')]?_0x2cbda8[_0x5b1f('0xb')]['raw']===undefined?!![]:![]:!![],'where':_0x2cbda8[_0x5b1f('0xb')]?_0x2cbda8[_0x5b1f('0xb')][_0x5b1f('0xd')]||null:null,'attributes':_0x2cbda8[_0x5b1f('0xb')]?_0x2cbda8[_0x5b1f('0xb')][_0x5b1f('0xe')]||null:null,'include':_0x2cbda8[_0x5b1f('0xb')]?_0x2cbda8[_0x5b1f('0xb')][_0x5b1f('0x10')]?_['map'](_0x2cbda8[_0x5b1f('0xb')][_0x5b1f('0x10')],function(_0x21de08){return{'model':db[_0x21de08[_0x5b1f('0x11')]],'as':_0x21de08['as'],'attributes':_0x21de08['attributes'],'include':_0x21de08['include']?_[_0x5b1f('0x12')](_0x21de08[_0x5b1f('0x10')],function(_0x2f9119){return{'model':db[_0x2f9119['model']],'as':_0x2f9119['as'],'attributes':_0x2f9119[_0x5b1f('0xe')],'include':_0x2f9119[_0x5b1f('0x10')]?_[_0x5b1f('0x12')](_0x2f9119[_0x5b1f('0x10')],function(_0x138f4b){return{'model':db[_0x138f4b[_0x5b1f('0x11')]],'as':_0x138f4b['as'],'attributes':_0x138f4b[_0x5b1f('0xe')]};}):[]};}):[]};}):[]:[]})[_0x5b1f('0x13')](function(_0x5f3692){logger[_0x5b1f('0x14')](_0x5b1f('0x19'),_0x2cbda8);logger[_0x5b1f('0x15')](_0x5b1f('0x19'),_0x2cbda8,JSON[_0x5b1f('0x16')](_0x5f3692));_0x2bd6d5(_0x5f3692);})[_0x5b1f('0x17')](function(_0x48dfcc){logger[_0x5b1f('0x18')](_0x5b1f('0x19'),_0x48dfcc[_0x5b1f('0x1b')],_0x2cbda8);_0x25b15c(_0xb5129d[_0x5b1f('0x18')](0x1f4,_0x48dfcc[_0x5b1f('0x1b')]));});});};
\ No newline at end of file