Built motion from commit 973e3e332e1c8e2f84c4b0cd2e5af794131724f5. Version 3.0.0...
[motion-next.git] / server / api / squareProject / squareProject.rpc.js
1 const a601_0x5962=['stringify','rpc','catch','ShowSquareProject','error','map','then','include','../../config/logger','../../rediscache','model','options','register','SquareProject','./squareProject.socket','attributes','where','message','debug'];(function(_0x238af3,_0x5962b2){const _0x5d11d9=function(_0x166599){while(--_0x166599){_0x238af3['push'](_0x238af3['shift']());}};_0x5d11d9(++_0x5962b2);}(a601_0x5962,0xa9));const a601_0x5d11=function(_0x238af3,_0x5962b2){_0x238af3=_0x238af3-0x0;let _0x5d11d9=a601_0x5962[_0x238af3];return _0x5d11d9;};const _0x396307=a601_0x5d11;'use strict';const db=require('../../mysqldb')['db'],logger=require(_0x396307('0xa'))(_0x396307('0x3')),_=require('lodash'),{getSocket}=require(_0x396307('0xb')),socket=getSocket();require(_0x396307('0x10'))[_0x396307('0xe')](socket),exports[_0x396307('0x5')]=function(_0x166599){const _0x18d925=this;return new Promise(function(_0x4243b4,_0x463ce5){const _0x17095d=a601_0x5d11;return db[_0x17095d('0xf')]['findOne']({'raw':_0x166599[_0x17095d('0xd')]?_0x166599['options']['raw']===undefined?!![]:![]:!![],'where':_0x166599[_0x17095d('0xd')]?_0x166599[_0x17095d('0xd')][_0x17095d('0x12')]||null:null,'attributes':_0x166599[_0x17095d('0xd')]?_0x166599['options']['attributes']||null:null,'include':_0x166599[_0x17095d('0xd')]?_0x166599[_0x17095d('0xd')][_0x17095d('0x9')]?_['map'](_0x166599[_0x17095d('0xd')][_0x17095d('0x9')],function(_0x298e99){const _0x599076=_0x17095d;return{'model':db[_0x298e99[_0x599076('0xc')]],'as':_0x298e99['as'],'attributes':_0x298e99[_0x599076('0x11')],'include':_0x298e99[_0x599076('0x9')]?_['map'](_0x298e99[_0x599076('0x9')],function(_0x246cb7){const _0x3598c0=_0x599076;return{'model':db[_0x246cb7['model']],'as':_0x246cb7['as'],'attributes':_0x246cb7['attributes'],'include':_0x246cb7[_0x3598c0('0x9')]?_[_0x3598c0('0x7')](_0x246cb7[_0x3598c0('0x9')],function(_0x386b2f){const _0x4d5fb1=_0x3598c0;return{'model':db[_0x386b2f[_0x4d5fb1('0xc')]],'as':_0x386b2f['as'],'attributes':_0x386b2f['attributes']};}):[]};}):[]};}):[]:[]})[_0x17095d('0x8')](function(_0x493bb6){const _0x509b83=_0x17095d;logger['info'](_0x509b83('0x5'),_0x166599),logger[_0x509b83('0x1')](_0x509b83('0x5'),_0x166599,JSON[_0x509b83('0x2')](_0x493bb6)),_0x4243b4(_0x493bb6);})[_0x17095d('0x4')](function(_0x21e8f5){const _0x3e0a4e=_0x17095d;logger[_0x3e0a4e('0x6')]('ShowSquareProject',_0x21e8f5[_0x3e0a4e('0x0')],_0x166599),_0x463ce5(_0x18d925[_0x3e0a4e('0x6')](0x1f4,_0x21e8f5[_0x3e0a4e('0x0')]));});});};