Built motion from commit (unavailable).|2.6.0
[motion2.git] / server / api / squareProject / squareProject.rpc.js
index eab0cd0..45749f5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc77b=['http','redis','localhost','./squareProject.socket','register','request','then','info','SquareProject,\x20%s,\x20%s','request\x20sent','SquareProject,\x20%s,\x20%s,\x20%s','stringify','error','message','result','ShowSquareProject','SquareProject','find','options','where','include','map','attributes','model','debug','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0xc216fb,_0x9b517a){var _0x1442cc=function(_0x301f1f){while(--_0x301f1f){_0xc216fb['push'](_0xc216fb['shift']());}};_0x1442cc(++_0x9b517a);}(_0xc77b,0x89));var _0xbc77=function(_0x588a49,_0x55c74e){_0x588a49=_0x588a49-0x0;var _0x48cd50=_0xc77b[_0x588a49];return _0x48cd50;};'use strict';var _=require(_0xbc77('0x0'));var util=require(_0xbc77('0x1'));var moment=require(_0xbc77('0x2'));var BPromise=require(_0xbc77('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xbc77('0x4'));var db=require(_0xbc77('0x5'))['db'];var utils=require(_0xbc77('0x6'));var logger=require(_0xbc77('0x7'))(_0xbc77('0x8'));var config=require(_0xbc77('0x9'));var jayson=require(_0xbc77('0xa'));var client=jayson['client'][_0xbc77('0xb')]({'port':0x232a});config[_0xbc77('0xc')]=_['defaults'](config[_0xbc77('0xc')],{'host':_0xbc77('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xbc77('0xc')]));require(_0xbc77('0xe'))[_0xbc77('0xf')](socket);function respondWithRpcPromise(_0x5b19f3,_0x30066b,_0x271614){return new BPromise(function(_0x4ddd68,_0x7a3a02){return client[_0xbc77('0x10')](_0x5b19f3,_0x271614)[_0xbc77('0x11')](function(_0xe88a30){logger[_0xbc77('0x12')](_0xbc77('0x13'),_0x30066b,_0xbc77('0x14'));logger['debug'](_0xbc77('0x15'),_0x30066b,_0xbc77('0x14'),JSON[_0xbc77('0x16')](_0xe88a30));if(_0xe88a30[_0xbc77('0x17')]){if(_0xe88a30['error']['code']===0x1f4){logger['error'](_0xbc77('0x13'),_0x30066b,_0xe88a30[_0xbc77('0x17')]['message']);return _0x7a3a02(_0xe88a30[_0xbc77('0x17')]['message']);}logger['error'](_0xbc77('0x13'),_0x30066b,_0xe88a30[_0xbc77('0x17')][_0xbc77('0x18')]);return _0x4ddd68(_0xe88a30[_0xbc77('0x17')][_0xbc77('0x18')]);}else{logger['info'](_0xbc77('0x13'),_0x30066b,_0xbc77('0x14'));_0x4ddd68(_0xe88a30[_0xbc77('0x19')]['message']);}})['catch'](function(_0x1755c5){logger[_0xbc77('0x17')](_0xbc77('0x13'),_0x30066b,_0x1755c5);_0x7a3a02(_0x1755c5);});});}exports[_0xbc77('0x1a')]=function(_0x10ff0d){var _0x4ba85c=this;return new Promise(function(_0x349084,_0x4af58f){return db[_0xbc77('0x1b')][_0xbc77('0x1c')]({'raw':_0x10ff0d[_0xbc77('0x1d')]?_0x10ff0d[_0xbc77('0x1d')]['raw']===undefined?!![]:![]:!![],'where':_0x10ff0d[_0xbc77('0x1d')]?_0x10ff0d['options'][_0xbc77('0x1e')]||null:null,'attributes':_0x10ff0d[_0xbc77('0x1d')]?_0x10ff0d[_0xbc77('0x1d')]['attributes']||null:null,'include':_0x10ff0d['options']?_0x10ff0d[_0xbc77('0x1d')][_0xbc77('0x1f')]?_[_0xbc77('0x20')](_0x10ff0d[_0xbc77('0x1d')][_0xbc77('0x1f')],function(_0x2ba3d8){return{'model':db[_0x2ba3d8['model']],'as':_0x2ba3d8['as'],'attributes':_0x2ba3d8[_0xbc77('0x21')],'include':_0x2ba3d8[_0xbc77('0x1f')]?_['map'](_0x2ba3d8[_0xbc77('0x1f')],function(_0x545255){return{'model':db[_0x545255[_0xbc77('0x22')]],'as':_0x545255['as'],'attributes':_0x545255[_0xbc77('0x21')],'include':_0x545255[_0xbc77('0x1f')]?_[_0xbc77('0x20')](_0x545255[_0xbc77('0x1f')],function(_0x118287){return{'model':db[_0x118287[_0xbc77('0x22')]],'as':_0x118287['as'],'attributes':_0x118287[_0xbc77('0x21')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x580b26){logger['info']('ShowSquareProject',_0x10ff0d);logger[_0xbc77('0x23')]('ShowSquareProject',_0x10ff0d,JSON[_0xbc77('0x16')](_0x580b26));_0x349084(_0x580b26);})[_0xbc77('0x24')](function(_0x16202e){logger[_0xbc77('0x17')]('ShowSquareProject',_0x16202e[_0xbc77('0x18')],_0x10ff0d);_0x4af58f(_0x4ba85c['error'](0x1f4,_0x16202e[_0xbc77('0x18')]));});});};
\ No newline at end of file
+var _0x4055=['ShowSquareProject','stringify','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost','./squareProject.socket','then','info','debug','SquareProject,\x20%s,\x20%s,\x20%s','error','SquareProject,\x20%s,\x20%s','message','result','catch','SquareProject','find','options','raw','where','attributes','include','model','map'];(function(_0x187c30,_0x2bc154){var _0x3b0cf3=function(_0x77cd03){while(--_0x77cd03){_0x187c30['push'](_0x187c30['shift']());}};_0x3b0cf3(++_0x2bc154);}(_0x4055,0x8e));var _0x5405=function(_0x5cc3d4,_0xbcbf9b){_0x5cc3d4=_0x5cc3d4-0x0;var _0x17ca31=_0x4055[_0x5cc3d4];return _0x17ca31;};'use strict';var _=require(_0x5405('0x0'));var util=require('util');var moment=require(_0x5405('0x1'));var BPromise=require(_0x5405('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5405('0x3'));var db=require(_0x5405('0x4'))['db'];var utils=require(_0x5405('0x5'));var logger=require(_0x5405('0x6'))(_0x5405('0x7'));var config=require(_0x5405('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x5405('0x9')][_0x5405('0xa')]({'port':0x232a});config[_0x5405('0xb')]=_[_0x5405('0xc')](config[_0x5405('0xb')],{'host':_0x5405('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x5405('0xe'))['register'](socket);function respondWithRpcPromise(_0xa06108,_0x178183,_0x9f8111){return new BPromise(function(_0x5ecda1,_0x3c84b8){return client['request'](_0xa06108,_0x9f8111)[_0x5405('0xf')](function(_0x5a7d1d){logger[_0x5405('0x10')]('SquareProject,\x20%s,\x20%s',_0x178183,'request\x20sent');logger[_0x5405('0x11')](_0x5405('0x12'),_0x178183,'request\x20sent',JSON['stringify'](_0x5a7d1d));if(_0x5a7d1d[_0x5405('0x13')]){if(_0x5a7d1d[_0x5405('0x13')]['code']===0x1f4){logger[_0x5405('0x13')](_0x5405('0x14'),_0x178183,_0x5a7d1d[_0x5405('0x13')][_0x5405('0x15')]);return _0x3c84b8(_0x5a7d1d['error'][_0x5405('0x15')]);}logger[_0x5405('0x13')](_0x5405('0x14'),_0x178183,_0x5a7d1d['error']['message']);return _0x5ecda1(_0x5a7d1d[_0x5405('0x13')][_0x5405('0x15')]);}else{logger['info']('SquareProject,\x20%s,\x20%s',_0x178183,'request\x20sent');_0x5ecda1(_0x5a7d1d[_0x5405('0x16')]['message']);}})[_0x5405('0x17')](function(_0x58adba){logger[_0x5405('0x13')](_0x5405('0x14'),_0x178183,_0x58adba);_0x3c84b8(_0x58adba);});});}exports['ShowSquareProject']=function(_0x3ceba4){var _0x14b08a=this;return new Promise(function(_0x23e922,_0x455cd8){return db[_0x5405('0x18')][_0x5405('0x19')]({'raw':_0x3ceba4[_0x5405('0x1a')]?_0x3ceba4[_0x5405('0x1a')][_0x5405('0x1b')]===undefined?!![]:![]:!![],'where':_0x3ceba4[_0x5405('0x1a')]?_0x3ceba4[_0x5405('0x1a')][_0x5405('0x1c')]||null:null,'attributes':_0x3ceba4[_0x5405('0x1a')]?_0x3ceba4[_0x5405('0x1a')][_0x5405('0x1d')]||null:null,'include':_0x3ceba4['options']?_0x3ceba4[_0x5405('0x1a')][_0x5405('0x1e')]?_['map'](_0x3ceba4[_0x5405('0x1a')]['include'],function(_0x1d00fc){return{'model':db[_0x1d00fc[_0x5405('0x1f')]],'as':_0x1d00fc['as'],'attributes':_0x1d00fc[_0x5405('0x1d')],'include':_0x1d00fc['include']?_[_0x5405('0x20')](_0x1d00fc['include'],function(_0x3a3c09){return{'model':db[_0x3a3c09[_0x5405('0x1f')]],'as':_0x3a3c09['as'],'attributes':_0x3a3c09[_0x5405('0x1d')],'include':_0x3a3c09['include']?_[_0x5405('0x20')](_0x3a3c09[_0x5405('0x1e')],function(_0x5b2e0d){return{'model':db[_0x5b2e0d[_0x5405('0x1f')]],'as':_0x5b2e0d['as'],'attributes':_0x5b2e0d[_0x5405('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x5405('0xf')](function(_0x4f6550){logger[_0x5405('0x10')](_0x5405('0x21'),_0x3ceba4);logger[_0x5405('0x11')](_0x5405('0x21'),_0x3ceba4,JSON[_0x5405('0x22')](_0x4f6550));_0x23e922(_0x4f6550);})[_0x5405('0x17')](function(_0x212d9a){logger[_0x5405('0x13')](_0x5405('0x21'),_0x212d9a[_0x5405('0x15')],_0x3ceba4);_0x455cd8(_0x14b08a['error'](0x1f4,_0x212d9a['message']));});});};
\ No newline at end of file