Built motion from commit 10af8726.|2.6.34
[motion2.git] / server / api / squareProject / squareProject.rpc.js
index 234766b..7c19349 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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
+var _0x142e=['then','info','stringify','catch','message','error','find','ShowSquareProject','lodash','../../config/logger','../../config/environment','redis','localhost','socket.io-emitter','./squareProject.socket','register','GetSquareProjects','SquareProject','findAll','options','raw','where','limit','include','map','model','attributes'];(function(_0x38ed42,_0x3d9a37){var _0x474931=function(_0x1fa601){while(--_0x1fa601){_0x38ed42['push'](_0x38ed42['shift']());}};_0x474931(++_0x3d9a37);}(_0x142e,0x19d));var _0xe142=function(_0x1752e0,_0x28cb20){_0x1752e0=_0x1752e0-0x0;var _0x161566=_0x142e[_0x1752e0];return _0x161566;};'use strict';var _=require(_0xe142('0x0'));var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var logger=require(_0xe142('0x1'))('rpc');var config=require(_0xe142('0x2'));config[_0xe142('0x3')]=_['defaults'](config[_0xe142('0x3')],{'host':_0xe142('0x4'),'port':0x18eb});var socket=require(_0xe142('0x5'))(new Redis(config[_0xe142('0x3')]));require(_0xe142('0x6'))[_0xe142('0x7')](socket);exports[_0xe142('0x8')]=function(_0x54a504){var _0x52725b=this;return new Promise(function(_0x27b89e,_0x4acd71){return db[_0xe142('0x9')][_0xe142('0xa')]({'raw':_0x54a504[_0xe142('0xb')]?_0x54a504[_0xe142('0xb')][_0xe142('0xc')]===undefined?!![]:![]:!![],'where':_0x54a504[_0xe142('0xb')]?_0x54a504[_0xe142('0xb')][_0xe142('0xd')]||null:null,'attributes':_0x54a504[_0xe142('0xb')]?_0x54a504[_0xe142('0xb')]['attributes']||null:null,'limit':_0x54a504[_0xe142('0xb')]?_0x54a504['options'][_0xe142('0xe')]||null:null,'include':_0x54a504[_0xe142('0xb')]?_0x54a504[_0xe142('0xb')][_0xe142('0xf')]?_[_0xe142('0x10')](_0x54a504[_0xe142('0xb')][_0xe142('0xf')],function(_0x397b95){return{'model':db[_0x397b95[_0xe142('0x11')]],'as':_0x397b95['as'],'attributes':_0x397b95['attributes'],'include':_0x397b95[_0xe142('0xf')]?_['map'](_0x397b95[_0xe142('0xf')],function(_0x42f2bf){return{'model':db[_0x42f2bf['model']],'as':_0x42f2bf['as'],'attributes':_0x42f2bf[_0xe142('0x12')],'include':_0x42f2bf[_0xe142('0xf')]?_[_0xe142('0x10')](_0x42f2bf[_0xe142('0xf')],function(_0x146806){return{'model':db[_0x146806[_0xe142('0x11')]],'as':_0x146806['as'],'attributes':_0x146806['attributes']};}):[]};}):[]};}):[]:[]})[_0xe142('0x13')](function(_0xdd25f0){logger[_0xe142('0x14')](_0xe142('0x8'),_0x54a504);logger['debug'](_0xe142('0x8'),_0x54a504,JSON[_0xe142('0x15')](_0xdd25f0));_0x27b89e(_0xdd25f0);})[_0xe142('0x16')](function(_0x3eb32d){logger['error'](_0xe142('0x8'),_0x3eb32d[_0xe142('0x17')],_0x54a504);_0x4acd71(_0x52725b[_0xe142('0x18')](0x1f4,_0x3eb32d[_0xe142('0x17')]));});});};exports['ShowSquareProject']=function(_0x2b5bbd){var _0x169062=this;return new Promise(function(_0x5150fa,_0x23fa6f){return db[_0xe142('0x9')][_0xe142('0x19')]({'raw':_0x2b5bbd[_0xe142('0xb')]?_0x2b5bbd[_0xe142('0xb')][_0xe142('0xc')]===undefined?!![]:![]:!![],'where':_0x2b5bbd[_0xe142('0xb')]?_0x2b5bbd['options'][_0xe142('0xd')]||null:null,'attributes':_0x2b5bbd['options']?_0x2b5bbd[_0xe142('0xb')][_0xe142('0x12')]||null:null,'include':_0x2b5bbd[_0xe142('0xb')]?_0x2b5bbd[_0xe142('0xb')][_0xe142('0xf')]?_['map'](_0x2b5bbd['options']['include'],function(_0xc6963e){return{'model':db[_0xc6963e[_0xe142('0x11')]],'as':_0xc6963e['as'],'attributes':_0xc6963e['attributes'],'include':_0xc6963e[_0xe142('0xf')]?_[_0xe142('0x10')](_0xc6963e[_0xe142('0xf')],function(_0x544418){return{'model':db[_0x544418[_0xe142('0x11')]],'as':_0x544418['as'],'attributes':_0x544418[_0xe142('0x12')],'include':_0x544418[_0xe142('0xf')]?_['map'](_0x544418[_0xe142('0xf')],function(_0x5daf95){return{'model':db[_0x5daf95[_0xe142('0x11')]],'as':_0x5daf95['as'],'attributes':_0x5daf95[_0xe142('0x12')]};}):[]};}):[]};}):[]:[]})[_0xe142('0x13')](function(_0x443759){logger['info'](_0xe142('0x1a'),_0x2b5bbd);logger['debug'](_0xe142('0x1a'),_0x2b5bbd,JSON['stringify'](_0x443759));_0x5150fa(_0x443759);})['catch'](function(_0x5b905f){logger[_0xe142('0x18')]('ShowSquareProject',_0x5b905f[_0xe142('0x17')],_0x2b5bbd);_0x23fa6f(_0x169062['error'](0x1f4,_0x5b905f[_0xe142('0x17')]));});});};
\ No newline at end of file