Built motion from commit (unavailable).|2.0.71
[motion2.git] / server / api / squareProject / squareProject.rpc.js
index 684ccde..1135253 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x861a=['where','attributes','include','map','model','debug','stringify','catch','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','SquareProject,\x20%s,\x20%s','SquareProject,\x20%s,\x20%s,\x20%s','error','code','message','request\x20sent','ShowSquareProject','SquareProject','find','options','raw'];(function(_0xa15038,_0xd53fdd){var _0x558fa8=function(_0x10deda){while(--_0x10deda){_0xa15038['push'](_0xa15038['shift']());}};_0x558fa8(++_0xd53fdd);}(_0x861a,0x194));var _0xa861=function(_0x45e75b,_0xe2db28){_0x45e75b=_0x45e75b-0x0;var _0x51d63f=_0x861a[_0x45e75b];return _0x51d63f;};'use strict';var _=require(_0xa861('0x0'));var util=require('util');var moment=require(_0xa861('0x1'));var BPromise=require(_0xa861('0x2'));var rs=require(_0xa861('0x3'));var fs=require('fs');var db=require(_0xa861('0x4'))['db'];var utils=require(_0xa861('0x5'));var logger=require(_0xa861('0x6'))('rpc');var config=require(_0xa861('0x7'));var jayson=require(_0xa861('0x8'));var client=jayson[_0xa861('0x9')][_0xa861('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x247b78,_0x5bc6cb,_0x2c9016){return new BPromise(function(_0x410918,_0x46e2ce){return client[_0xa861('0xb')](_0x247b78,_0x2c9016)[_0xa861('0xc')](function(_0x2e3ad3){logger[_0xa861('0xd')](_0xa861('0xe'),_0x5bc6cb,'request\x20sent');logger['debug'](_0xa861('0xf'),_0x5bc6cb,'request\x20sent',JSON['stringify'](_0x2e3ad3));if(_0x2e3ad3[_0xa861('0x10')]){if(_0x2e3ad3[_0xa861('0x10')][_0xa861('0x11')]===0x1f4){logger['error'](_0xa861('0xe'),_0x5bc6cb,_0x2e3ad3[_0xa861('0x10')][_0xa861('0x12')]);return _0x46e2ce(_0x2e3ad3[_0xa861('0x10')][_0xa861('0x12')]);}logger['error']('SquareProject,\x20%s,\x20%s',_0x5bc6cb,_0x2e3ad3[_0xa861('0x10')]['message']);return _0x410918(_0x2e3ad3['error'][_0xa861('0x12')]);}else{logger[_0xa861('0xd')](_0xa861('0xe'),_0x5bc6cb,_0xa861('0x13'));_0x410918(_0x2e3ad3['result'][_0xa861('0x12')]);}})['catch'](function(_0x5e8bb6){logger[_0xa861('0x10')](_0xa861('0xe'),_0x5bc6cb,_0x5e8bb6);_0x46e2ce(_0x5e8bb6);});});}exports[_0xa861('0x14')]=function(_0x555bbe){var _0xc85eb3=this;return new Promise(function(_0x270452,_0x2cbdae){return db[_0xa861('0x15')][_0xa861('0x16')]({'raw':_0x555bbe['options']?_0x555bbe[_0xa861('0x17')][_0xa861('0x18')]===undefined?!![]:![]:!![],'where':_0x555bbe[_0xa861('0x17')]?_0x555bbe[_0xa861('0x17')][_0xa861('0x19')]||null:null,'attributes':_0x555bbe['options']?_0x555bbe[_0xa861('0x17')][_0xa861('0x1a')]||null:null,'include':_0x555bbe[_0xa861('0x17')]?_0x555bbe['options'][_0xa861('0x1b')]?_[_0xa861('0x1c')](_0x555bbe['options'][_0xa861('0x1b')],function(_0x173aec){return{'model':db[_0x173aec[_0xa861('0x1d')]],'as':_0x173aec['as'],'attributes':_0x173aec['attributes'],'include':_0x173aec[_0xa861('0x1b')]?_[_0xa861('0x1c')](_0x173aec['include'],function(_0x1b06f8){return{'model':db[_0x1b06f8[_0xa861('0x1d')]],'as':_0x1b06f8['as'],'attributes':_0x1b06f8['attributes'],'include':_0x1b06f8[_0xa861('0x1b')]?_[_0xa861('0x1c')](_0x1b06f8[_0xa861('0x1b')],function(_0x598b72){return{'model':db[_0x598b72[_0xa861('0x1d')]],'as':_0x598b72['as'],'attributes':_0x598b72[_0xa861('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xa861('0xc')](function(_0x2176d3){logger[_0xa861('0xd')](_0xa861('0x14'),_0x555bbe);logger[_0xa861('0x1e')]('ShowSquareProject',_0x555bbe,JSON[_0xa861('0x1f')](_0x2176d3));_0x270452(_0x2176d3);})[_0xa861('0x20')](function(_0x8c83a5){logger['error'](_0xa861('0x14'),_0x8c83a5[_0xa861('0x12')],_0x555bbe);_0x2cbdae(_0xc85eb3[_0xa861('0x10')](0x1f4,_0x8c83a5[_0xa861('0x12')]));});});};
\ No newline at end of file
+var _0x909d=['../../config/environment','client','http','socket.io-emitter','./squareProject.socket','register','request','then','info','SquareProject,\x20%s,\x20%s','request\x20sent','debug','SquareProject,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','ShowSquareProject','SquareProject','find','raw','options','where','attributes','include','model','map','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils'];(function(_0x2a319f,_0x3ea13e){var _0x4931e0=function(_0x62a1a8){while(--_0x62a1a8){_0x2a319f['push'](_0x2a319f['shift']());}};_0x4931e0(++_0x3ea13e);}(_0x909d,0x170));var _0xd909=function(_0x13b02f,_0x462a53){_0x13b02f=_0x13b02f-0x0;var _0x12e9a6=_0x909d[_0x13b02f];return _0x12e9a6;};'use strict';var _=require('lodash');var util=require(_0xd909('0x0'));var moment=require(_0xd909('0x1'));var BPromise=require(_0xd909('0x2'));var rs=require(_0xd909('0x3'));var fs=require('fs');var db=require(_0xd909('0x4'))['db'];var utils=require(_0xd909('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0xd909('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xd909('0x7')][_0xd909('0x8')]({'port':0x232a});var socket=require(_0xd909('0x9'))({'host':'localhost','port':0x18eb});require(_0xd909('0xa'))[_0xd909('0xb')](socket);function respondWithRpcPromise(_0x41d544,_0x5b853e,_0x31c803){return new BPromise(function(_0xe79209,_0x4c416c){return client[_0xd909('0xc')](_0x41d544,_0x31c803)[_0xd909('0xd')](function(_0x3cb01a){logger[_0xd909('0xe')](_0xd909('0xf'),_0x5b853e,_0xd909('0x10'));logger[_0xd909('0x11')](_0xd909('0x12'),_0x5b853e,_0xd909('0x10'),JSON[_0xd909('0x13')](_0x3cb01a));if(_0x3cb01a[_0xd909('0x14')]){if(_0x3cb01a[_0xd909('0x14')][_0xd909('0x15')]===0x1f4){logger[_0xd909('0x14')](_0xd909('0xf'),_0x5b853e,_0x3cb01a['error'][_0xd909('0x16')]);return _0x4c416c(_0x3cb01a['error'][_0xd909('0x16')]);}logger[_0xd909('0x14')](_0xd909('0xf'),_0x5b853e,_0x3cb01a[_0xd909('0x14')][_0xd909('0x16')]);return _0xe79209(_0x3cb01a[_0xd909('0x14')][_0xd909('0x16')]);}else{logger[_0xd909('0xe')](_0xd909('0xf'),_0x5b853e,_0xd909('0x10'));_0xe79209(_0x3cb01a['result'][_0xd909('0x16')]);}})[_0xd909('0x17')](function(_0x11a530){logger[_0xd909('0x14')](_0xd909('0xf'),_0x5b853e,_0x11a530);_0x4c416c(_0x11a530);});});}exports[_0xd909('0x18')]=function(_0x2f68cd){var _0x490db2=this;return new Promise(function(_0x2ca8dd,_0x4ff5cc){return db[_0xd909('0x19')][_0xd909('0x1a')]({'raw':_0x2f68cd['options']?_0x2f68cd['options'][_0xd909('0x1b')]===undefined?!![]:![]:!![],'where':_0x2f68cd['options']?_0x2f68cd[_0xd909('0x1c')][_0xd909('0x1d')]||null:null,'attributes':_0x2f68cd[_0xd909('0x1c')]?_0x2f68cd[_0xd909('0x1c')][_0xd909('0x1e')]||null:null,'include':_0x2f68cd[_0xd909('0x1c')]?_0x2f68cd[_0xd909('0x1c')][_0xd909('0x1f')]?_['map'](_0x2f68cd[_0xd909('0x1c')][_0xd909('0x1f')],function(_0x268574){return{'model':db[_0x268574[_0xd909('0x20')]],'as':_0x268574['as'],'attributes':_0x268574[_0xd909('0x1e')],'include':_0x268574[_0xd909('0x1f')]?_[_0xd909('0x21')](_0x268574[_0xd909('0x1f')],function(_0x59a71d){return{'model':db[_0x59a71d['model']],'as':_0x59a71d['as'],'attributes':_0x59a71d['attributes'],'include':_0x59a71d[_0xd909('0x1f')]?_[_0xd909('0x21')](_0x59a71d[_0xd909('0x1f')],function(_0x413021){return{'model':db[_0x413021['model']],'as':_0x413021['as'],'attributes':_0x413021['attributes']};}):[]};}):[]};}):[]:[]})[_0xd909('0xd')](function(_0x438bbd){logger['info']('ShowSquareProject',_0x2f68cd);logger['debug'](_0xd909('0x18'),_0x2f68cd,JSON[_0xd909('0x13')](_0x438bbd));_0x2ca8dd(_0x438bbd);})[_0xd909('0x17')](function(_0x1660ef){logger['error'](_0xd909('0x18'),_0x1660ef[_0xd909('0x16')],_0x2f68cd);_0x4ff5cc(_0x490db2[_0xd909('0x14')](0x1f4,_0x1660ef[_0xd909('0x16')]));});});};
\ No newline at end of file