Built motion from commit ecb45b58.|2.6.31
[motion2.git] / server / api / squareProject / squareProject.rpc.js
index 3731385..6fd0cc3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdc72=['lodash','ioredis','../../mysqldb','../../config/logger','rpc','redis','socket.io-emitter','./squareProject.socket','SquareProject','findAll','options','raw','attributes','limit','include','map','model','then','debug','GetSquareProjects','stringify','catch','error','message','ShowSquareProject','find','info'];(function(_0x4f134a,_0x8e90c){var _0x3c3ead=function(_0x57cdff){while(--_0x57cdff){_0x4f134a['push'](_0x4f134a['shift']());}};_0x3c3ead(++_0x8e90c);}(_0xdc72,0xd8));var _0x2dc7=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xdc72[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x2dc7('0x0'));var Redis=require(_0x2dc7('0x1'));var db=require(_0x2dc7('0x2'))['db'];var logger=require(_0x2dc7('0x3'))(_0x2dc7('0x4'));var config=require('../../config/environment');config[_0x2dc7('0x5')]=_['defaults'](config[_0x2dc7('0x5')],{'host':'localhost','port':0x18eb});var socket=require(_0x2dc7('0x6'))(new Redis(config[_0x2dc7('0x5')]));require(_0x2dc7('0x7'))['register'](socket);exports['GetSquareProjects']=function(_0x47cacf){var _0x547daf=this;return new Promise(function(_0x2a8fd1,_0x4e7db5){return db[_0x2dc7('0x8')][_0x2dc7('0x9')]({'raw':_0x47cacf[_0x2dc7('0xa')]?_0x47cacf[_0x2dc7('0xa')][_0x2dc7('0xb')]===undefined?!![]:![]:!![],'where':_0x47cacf[_0x2dc7('0xa')]?_0x47cacf[_0x2dc7('0xa')]['where']||null:null,'attributes':_0x47cacf['options']?_0x47cacf[_0x2dc7('0xa')][_0x2dc7('0xc')]||null:null,'limit':_0x47cacf[_0x2dc7('0xa')]?_0x47cacf[_0x2dc7('0xa')][_0x2dc7('0xd')]||null:null,'include':_0x47cacf[_0x2dc7('0xa')]?_0x47cacf[_0x2dc7('0xa')][_0x2dc7('0xe')]?_[_0x2dc7('0xf')](_0x47cacf['options'][_0x2dc7('0xe')],function(_0x42bba3){return{'model':db[_0x42bba3['model']],'as':_0x42bba3['as'],'attributes':_0x42bba3[_0x2dc7('0xc')],'include':_0x42bba3['include']?_[_0x2dc7('0xf')](_0x42bba3[_0x2dc7('0xe')],function(_0x29d578){return{'model':db[_0x29d578['model']],'as':_0x29d578['as'],'attributes':_0x29d578['attributes'],'include':_0x29d578[_0x2dc7('0xe')]?_[_0x2dc7('0xf')](_0x29d578[_0x2dc7('0xe')],function(_0x1d3cda){return{'model':db[_0x1d3cda[_0x2dc7('0x10')]],'as':_0x1d3cda['as'],'attributes':_0x1d3cda[_0x2dc7('0xc')]};}):[]};}):[]};}):[]:[]})[_0x2dc7('0x11')](function(_0x10329f){logger['info']('GetSquareProjects',_0x47cacf);logger[_0x2dc7('0x12')](_0x2dc7('0x13'),_0x47cacf,JSON[_0x2dc7('0x14')](_0x10329f));_0x2a8fd1(_0x10329f);})[_0x2dc7('0x15')](function(_0x678196){logger[_0x2dc7('0x16')](_0x2dc7('0x13'),_0x678196[_0x2dc7('0x17')],_0x47cacf);_0x4e7db5(_0x547daf[_0x2dc7('0x16')](0x1f4,_0x678196[_0x2dc7('0x17')]));});});};exports[_0x2dc7('0x18')]=function(_0x2fd76a){var _0x57193b=this;return new Promise(function(_0x2f92b7,_0x1b7a5d){return db['SquareProject'][_0x2dc7('0x19')]({'raw':_0x2fd76a[_0x2dc7('0xa')]?_0x2fd76a[_0x2dc7('0xa')]['raw']===undefined?!![]:![]:!![],'where':_0x2fd76a[_0x2dc7('0xa')]?_0x2fd76a['options']['where']||null:null,'attributes':_0x2fd76a[_0x2dc7('0xa')]?_0x2fd76a[_0x2dc7('0xa')][_0x2dc7('0xc')]||null:null,'include':_0x2fd76a[_0x2dc7('0xa')]?_0x2fd76a['options']['include']?_[_0x2dc7('0xf')](_0x2fd76a[_0x2dc7('0xa')][_0x2dc7('0xe')],function(_0x5eb251){return{'model':db[_0x5eb251[_0x2dc7('0x10')]],'as':_0x5eb251['as'],'attributes':_0x5eb251[_0x2dc7('0xc')],'include':_0x5eb251[_0x2dc7('0xe')]?_[_0x2dc7('0xf')](_0x5eb251[_0x2dc7('0xe')],function(_0x3dc439){return{'model':db[_0x3dc439[_0x2dc7('0x10')]],'as':_0x3dc439['as'],'attributes':_0x3dc439[_0x2dc7('0xc')],'include':_0x3dc439['include']?_[_0x2dc7('0xf')](_0x3dc439[_0x2dc7('0xe')],function(_0x542223){return{'model':db[_0x542223[_0x2dc7('0x10')]],'as':_0x542223['as'],'attributes':_0x542223['attributes']};}):[]};}):[]};}):[]:[]})[_0x2dc7('0x11')](function(_0x71ade){logger[_0x2dc7('0x1a')](_0x2dc7('0x18'),_0x2fd76a);logger[_0x2dc7('0x12')](_0x2dc7('0x18'),_0x2fd76a,JSON[_0x2dc7('0x14')](_0x71ade));_0x2f92b7(_0x71ade);})[_0x2dc7('0x15')](function(_0x190f9f){logger['error']('ShowSquareProject',_0x190f9f['message'],_0x2fd76a);_0x1b7a5d(_0x57193b['error'](0x1f4,_0x190f9f['message']));});});};
\ No newline at end of file
+var _0x598a=['error','message','ShowSquareProject','find','where','lodash','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','redis','defaults','localhost','socket.io-emitter','./squareProject.socket','register','GetSquareProjects','options','raw','limit','include','model','attributes','map','then','info','debug','catch'];(function(_0x2954a6,_0x191865){var _0x4db65e=function(_0x24f43d){while(--_0x24f43d){_0x2954a6['push'](_0x2954a6['shift']());}};_0x4db65e(++_0x191865);}(_0x598a,0xed));var _0xa598=function(_0x215657,_0x4eb499){_0x215657=_0x215657-0x0;var _0x3a3c16=_0x598a[_0x215657];return _0x3a3c16;};'use strict';var _=require(_0xa598('0x0'));var Redis=require(_0xa598('0x1'));var db=require(_0xa598('0x2'))['db'];var logger=require(_0xa598('0x3'))(_0xa598('0x4'));var config=require(_0xa598('0x5'));config[_0xa598('0x6')]=_[_0xa598('0x7')](config[_0xa598('0x6')],{'host':_0xa598('0x8'),'port':0x18eb});var socket=require(_0xa598('0x9'))(new Redis(config[_0xa598('0x6')]));require(_0xa598('0xa'))[_0xa598('0xb')](socket);exports[_0xa598('0xc')]=function(_0x4d62fe){var _0x388c50=this;return new Promise(function(_0x365ae2,_0xd3c030){return db['SquareProject']['findAll']({'raw':_0x4d62fe[_0xa598('0xd')]?_0x4d62fe[_0xa598('0xd')][_0xa598('0xe')]===undefined?!![]:![]:!![],'where':_0x4d62fe['options']?_0x4d62fe[_0xa598('0xd')]['where']||null:null,'attributes':_0x4d62fe[_0xa598('0xd')]?_0x4d62fe['options']['attributes']||null:null,'limit':_0x4d62fe[_0xa598('0xd')]?_0x4d62fe[_0xa598('0xd')][_0xa598('0xf')]||null:null,'include':_0x4d62fe['options']?_0x4d62fe[_0xa598('0xd')][_0xa598('0x10')]?_['map'](_0x4d62fe[_0xa598('0xd')]['include'],function(_0x5aa7c9){return{'model':db[_0x5aa7c9[_0xa598('0x11')]],'as':_0x5aa7c9['as'],'attributes':_0x5aa7c9[_0xa598('0x12')],'include':_0x5aa7c9[_0xa598('0x10')]?_[_0xa598('0x13')](_0x5aa7c9[_0xa598('0x10')],function(_0x425b68){return{'model':db[_0x425b68[_0xa598('0x11')]],'as':_0x425b68['as'],'attributes':_0x425b68['attributes'],'include':_0x425b68[_0xa598('0x10')]?_['map'](_0x425b68[_0xa598('0x10')],function(_0x1c8821){return{'model':db[_0x1c8821[_0xa598('0x11')]],'as':_0x1c8821['as'],'attributes':_0x1c8821[_0xa598('0x12')]};}):[]};}):[]};}):[]:[]})[_0xa598('0x14')](function(_0x2af5d7){logger[_0xa598('0x15')](_0xa598('0xc'),_0x4d62fe);logger[_0xa598('0x16')](_0xa598('0xc'),_0x4d62fe,JSON['stringify'](_0x2af5d7));_0x365ae2(_0x2af5d7);})[_0xa598('0x17')](function(_0x12f9df){logger[_0xa598('0x18')]('GetSquareProjects',_0x12f9df['message'],_0x4d62fe);_0xd3c030(_0x388c50[_0xa598('0x18')](0x1f4,_0x12f9df[_0xa598('0x19')]));});});};exports[_0xa598('0x1a')]=function(_0x2b8b51){var _0x3939cd=this;return new Promise(function(_0x4affc5,_0x1fd616){return db['SquareProject'][_0xa598('0x1b')]({'raw':_0x2b8b51[_0xa598('0xd')]?_0x2b8b51['options']['raw']===undefined?!![]:![]:!![],'where':_0x2b8b51[_0xa598('0xd')]?_0x2b8b51[_0xa598('0xd')][_0xa598('0x1c')]||null:null,'attributes':_0x2b8b51[_0xa598('0xd')]?_0x2b8b51[_0xa598('0xd')]['attributes']||null:null,'include':_0x2b8b51[_0xa598('0xd')]?_0x2b8b51['options'][_0xa598('0x10')]?_['map'](_0x2b8b51[_0xa598('0xd')][_0xa598('0x10')],function(_0x29e967){return{'model':db[_0x29e967[_0xa598('0x11')]],'as':_0x29e967['as'],'attributes':_0x29e967[_0xa598('0x12')],'include':_0x29e967[_0xa598('0x10')]?_['map'](_0x29e967[_0xa598('0x10')],function(_0x792b79){return{'model':db[_0x792b79[_0xa598('0x11')]],'as':_0x792b79['as'],'attributes':_0x792b79[_0xa598('0x12')],'include':_0x792b79['include']?_['map'](_0x792b79[_0xa598('0x10')],function(_0x22c2ad){return{'model':db[_0x22c2ad[_0xa598('0x11')]],'as':_0x22c2ad['as'],'attributes':_0x22c2ad[_0xa598('0x12')]};}):[]};}):[]};}):[]:[]})[_0xa598('0x14')](function(_0x436f53){logger[_0xa598('0x15')](_0xa598('0x1a'),_0x2b8b51);logger['debug'](_0xa598('0x1a'),_0x2b8b51,JSON['stringify'](_0x436f53));_0x4affc5(_0x436f53);})[_0xa598('0x17')](function(_0x3e3a3b){logger[_0xa598('0x18')](_0xa598('0x1a'),_0x3e3a3b[_0xa598('0x19')],_0x2b8b51);_0x1fd616(_0x3939cd[_0xa598('0x18')](0x1f4,_0x3e3a3b[_0xa598('0x19')]));});});};
\ No newline at end of file