Built motion from commit 167bccf5.|2.6.7
[motion2.git] / server / api / squareProject / squareProject.rpc.js
index 1789f83..e096575 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3f19=['GetSquareProjects','catch','message','error','SquareProject','find','where','ShowSquareProject','debug','stringify','lodash','../../mysqldb','../../config/logger','rpc','redis','defaults','localhost','socket.io-emitter','./squareProject.socket','findAll','raw','options','limit','include','map','model','attributes','then','info'];(function(_0xf5a599,_0x485419){var _0x5d0919=function(_0x313c5d){while(--_0x313c5d){_0xf5a599['push'](_0xf5a599['shift']());}};_0x5d0919(++_0x485419);}(_0x3f19,0x149));var _0x93f1=function(_0x4ec520,_0x15fee2){_0x4ec520=_0x4ec520-0x0;var _0xed49d7=_0x3f19[_0x4ec520];return _0xed49d7;};'use strict';var _=require(_0x93f1('0x0'));var Redis=require('ioredis');var db=require(_0x93f1('0x1'))['db'];var logger=require(_0x93f1('0x2'))(_0x93f1('0x3'));var config=require('../../config/environment');config[_0x93f1('0x4')]=_[_0x93f1('0x5')](config['redis'],{'host':_0x93f1('0x6'),'port':0x18eb});var socket=require(_0x93f1('0x7'))(new Redis(config[_0x93f1('0x4')]));require(_0x93f1('0x8'))['register'](socket);exports['GetSquareProjects']=function(_0x3bb48e){var _0x554013=this;return new Promise(function(_0x56f598,_0x359266){return db['SquareProject'][_0x93f1('0x9')]({'raw':_0x3bb48e['options']?_0x3bb48e['options'][_0x93f1('0xa')]===undefined?!![]:![]:!![],'where':_0x3bb48e[_0x93f1('0xb')]?_0x3bb48e[_0x93f1('0xb')]['where']||null:null,'attributes':_0x3bb48e[_0x93f1('0xb')]?_0x3bb48e[_0x93f1('0xb')]['attributes']||null:null,'limit':_0x3bb48e[_0x93f1('0xb')]?_0x3bb48e[_0x93f1('0xb')][_0x93f1('0xc')]||null:null,'include':_0x3bb48e[_0x93f1('0xb')]?_0x3bb48e[_0x93f1('0xb')][_0x93f1('0xd')]?_[_0x93f1('0xe')](_0x3bb48e[_0x93f1('0xb')][_0x93f1('0xd')],function(_0xca8f96){return{'model':db[_0xca8f96[_0x93f1('0xf')]],'as':_0xca8f96['as'],'attributes':_0xca8f96['attributes'],'include':_0xca8f96[_0x93f1('0xd')]?_[_0x93f1('0xe')](_0xca8f96['include'],function(_0x95e3b1){return{'model':db[_0x95e3b1['model']],'as':_0x95e3b1['as'],'attributes':_0x95e3b1['attributes'],'include':_0x95e3b1[_0x93f1('0xd')]?_[_0x93f1('0xe')](_0x95e3b1[_0x93f1('0xd')],function(_0x3d4c47){return{'model':db[_0x3d4c47['model']],'as':_0x3d4c47['as'],'attributes':_0x3d4c47[_0x93f1('0x10')]};}):[]};}):[]};}):[]:[]})[_0x93f1('0x11')](function(_0x59517d){logger[_0x93f1('0x12')](_0x93f1('0x13'),_0x3bb48e);logger['debug'](_0x93f1('0x13'),_0x3bb48e,JSON['stringify'](_0x59517d));_0x56f598(_0x59517d);})[_0x93f1('0x14')](function(_0x5beaf3){logger['error'](_0x93f1('0x13'),_0x5beaf3[_0x93f1('0x15')],_0x3bb48e);_0x359266(_0x554013[_0x93f1('0x16')](0x1f4,_0x5beaf3['message']));});});};exports['ShowSquareProject']=function(_0x3a967b){var _0x35a536=this;return new Promise(function(_0x116943,_0xaab2b0){return db[_0x93f1('0x17')][_0x93f1('0x18')]({'raw':_0x3a967b[_0x93f1('0xb')]?_0x3a967b['options']['raw']===undefined?!![]:![]:!![],'where':_0x3a967b['options']?_0x3a967b[_0x93f1('0xb')][_0x93f1('0x19')]||null:null,'attributes':_0x3a967b[_0x93f1('0xb')]?_0x3a967b[_0x93f1('0xb')][_0x93f1('0x10')]||null:null,'include':_0x3a967b['options']?_0x3a967b['options'][_0x93f1('0xd')]?_[_0x93f1('0xe')](_0x3a967b[_0x93f1('0xb')]['include'],function(_0x3fe9b4){return{'model':db[_0x3fe9b4[_0x93f1('0xf')]],'as':_0x3fe9b4['as'],'attributes':_0x3fe9b4['attributes'],'include':_0x3fe9b4['include']?_[_0x93f1('0xe')](_0x3fe9b4[_0x93f1('0xd')],function(_0x4f53e1){return{'model':db[_0x4f53e1['model']],'as':_0x4f53e1['as'],'attributes':_0x4f53e1['attributes'],'include':_0x4f53e1[_0x93f1('0xd')]?_['map'](_0x4f53e1[_0x93f1('0xd')],function(_0x4d0f12){return{'model':db[_0x4d0f12[_0x93f1('0xf')]],'as':_0x4d0f12['as'],'attributes':_0x4d0f12[_0x93f1('0x10')]};}):[]};}):[]};}):[]:[]})['then'](function(_0xc97c83){logger[_0x93f1('0x12')](_0x93f1('0x1a'),_0x3a967b);logger[_0x93f1('0x1b')](_0x93f1('0x1a'),_0x3a967b,JSON[_0x93f1('0x1c')](_0xc97c83));_0x116943(_0xc97c83);})[_0x93f1('0x14')](function(_0x39f0a4){logger[_0x93f1('0x16')]('ShowSquareProject',_0x39f0a4[_0x93f1('0x15')],_0x3a967b);_0xaab2b0(_0x35a536[_0x93f1('0x16')](0x1f4,_0x39f0a4['message']));});});};
\ No newline at end of file
+var _0x67bc=['message','error','find','info','ShowSquareProject','ioredis','../../mysqldb','rpc','redis','defaults','localhost','socket.io-emitter','./squareProject.socket','GetSquareProjects','SquareProject','findAll','raw','options','where','limit','include','model','attributes','map','then','debug','stringify','catch'];(function(_0x5e8721,_0x378840){var _0xc78d88=function(_0x3dbff7){while(--_0x3dbff7){_0x5e8721['push'](_0x5e8721['shift']());}};_0xc78d88(++_0x378840);}(_0x67bc,0x1a9));var _0xc67b=function(_0x39bc44,_0x1d4373){_0x39bc44=_0x39bc44-0x0;var _0x2916d8=_0x67bc[_0x39bc44];return _0x2916d8;};'use strict';var _=require('lodash');var Redis=require(_0xc67b('0x0'));var db=require(_0xc67b('0x1'))['db'];var logger=require('../../config/logger')(_0xc67b('0x2'));var config=require('../../config/environment');config[_0xc67b('0x3')]=_[_0xc67b('0x4')](config['redis'],{'host':_0xc67b('0x5'),'port':0x18eb});var socket=require(_0xc67b('0x6'))(new Redis(config['redis']));require(_0xc67b('0x7'))['register'](socket);exports[_0xc67b('0x8')]=function(_0x28db39){var _0x3c368d=this;return new Promise(function(_0x935781,_0x46e13f){return db[_0xc67b('0x9')][_0xc67b('0xa')]({'raw':_0x28db39['options']?_0x28db39['options'][_0xc67b('0xb')]===undefined?!![]:![]:!![],'where':_0x28db39[_0xc67b('0xc')]?_0x28db39[_0xc67b('0xc')][_0xc67b('0xd')]||null:null,'attributes':_0x28db39[_0xc67b('0xc')]?_0x28db39['options']['attributes']||null:null,'limit':_0x28db39['options']?_0x28db39[_0xc67b('0xc')][_0xc67b('0xe')]||null:null,'include':_0x28db39['options']?_0x28db39['options']['include']?_['map'](_0x28db39[_0xc67b('0xc')][_0xc67b('0xf')],function(_0x6de0fa){return{'model':db[_0x6de0fa[_0xc67b('0x10')]],'as':_0x6de0fa['as'],'attributes':_0x6de0fa[_0xc67b('0x11')],'include':_0x6de0fa[_0xc67b('0xf')]?_[_0xc67b('0x12')](_0x6de0fa['include'],function(_0x1bc537){return{'model':db[_0x1bc537[_0xc67b('0x10')]],'as':_0x1bc537['as'],'attributes':_0x1bc537[_0xc67b('0x11')],'include':_0x1bc537[_0xc67b('0xf')]?_[_0xc67b('0x12')](_0x1bc537[_0xc67b('0xf')],function(_0x35b38a){return{'model':db[_0x35b38a[_0xc67b('0x10')]],'as':_0x35b38a['as'],'attributes':_0x35b38a[_0xc67b('0x11')]};}):[]};}):[]};}):[]:[]})[_0xc67b('0x13')](function(_0x2d20c7){logger['info'](_0xc67b('0x8'),_0x28db39);logger[_0xc67b('0x14')](_0xc67b('0x8'),_0x28db39,JSON[_0xc67b('0x15')](_0x2d20c7));_0x935781(_0x2d20c7);})[_0xc67b('0x16')](function(_0x316c3c){logger['error'](_0xc67b('0x8'),_0x316c3c[_0xc67b('0x17')],_0x28db39);_0x46e13f(_0x3c368d[_0xc67b('0x18')](0x1f4,_0x316c3c[_0xc67b('0x17')]));});});};exports['ShowSquareProject']=function(_0x4b04c4){var _0x4bc2e9=this;return new Promise(function(_0x42b75e,_0x92ca46){return db[_0xc67b('0x9')][_0xc67b('0x19')]({'raw':_0x4b04c4['options']?_0x4b04c4[_0xc67b('0xc')][_0xc67b('0xb')]===undefined?!![]:![]:!![],'where':_0x4b04c4[_0xc67b('0xc')]?_0x4b04c4[_0xc67b('0xc')][_0xc67b('0xd')]||null:null,'attributes':_0x4b04c4[_0xc67b('0xc')]?_0x4b04c4['options']['attributes']||null:null,'include':_0x4b04c4[_0xc67b('0xc')]?_0x4b04c4[_0xc67b('0xc')][_0xc67b('0xf')]?_[_0xc67b('0x12')](_0x4b04c4[_0xc67b('0xc')][_0xc67b('0xf')],function(_0x1bd6f4){return{'model':db[_0x1bd6f4[_0xc67b('0x10')]],'as':_0x1bd6f4['as'],'attributes':_0x1bd6f4[_0xc67b('0x11')],'include':_0x1bd6f4[_0xc67b('0xf')]?_[_0xc67b('0x12')](_0x1bd6f4[_0xc67b('0xf')],function(_0x499b6f){return{'model':db[_0x499b6f['model']],'as':_0x499b6f['as'],'attributes':_0x499b6f[_0xc67b('0x11')],'include':_0x499b6f[_0xc67b('0xf')]?_['map'](_0x499b6f[_0xc67b('0xf')],function(_0x385d40){return{'model':db[_0x385d40[_0xc67b('0x10')]],'as':_0x385d40['as'],'attributes':_0x385d40['attributes']};}):[]};}):[]};}):[]:[]})[_0xc67b('0x13')](function(_0x29a3a6){logger[_0xc67b('0x1a')](_0xc67b('0x1b'),_0x4b04c4);logger[_0xc67b('0x14')](_0xc67b('0x1b'),_0x4b04c4,JSON['stringify'](_0x29a3a6));_0x42b75e(_0x29a3a6);})[_0xc67b('0x16')](function(_0x3dba50){logger[_0xc67b('0x18')]('ShowSquareProject',_0x3dba50[_0xc67b('0x17')],_0x4b04c4);_0x92ca46(_0x4bc2e9[_0xc67b('0x18')](0x1f4,_0x3dba50['message']));});});};
\ No newline at end of file