Built motion from commit b51cdcb3f2cb46634587ce1d55ea1b8f32dacea6. Version 3.0.0...
[motion-next.git] / server / api / campaign / campaign.rpc.js
index ca0f0f7..387b192 100644 (file)
@@ -1 +1 @@
-const a44_0x5490=['error','catch','where','GetCampaign','Campaign','info','../../mysqldb','message','map','options','raw','debug','then','include','attributes','limit','model','../../config/logger'];(function(_0x3fe4a8,_0x549072){const _0x1fc46d=function(_0x3073ed){while(--_0x3073ed){_0x3fe4a8['push'](_0x3fe4a8['shift']());}};_0x1fc46d(++_0x549072);}(a44_0x5490,0x1c8));const a44_0x1fc4=function(_0x3fe4a8,_0x549072){_0x3fe4a8=_0x3fe4a8-0x0;let _0x1fc46d=a44_0x5490[_0x3fe4a8];return _0x1fc46d;};const _0x236c64=a44_0x1fc4;'use strict';const _=require('lodash'),db=require(_0x236c64('0x0'))['db'],logger=require(_0x236c64('0xb'))('rpc');exports[_0x236c64('0xf')]=function(_0x3073ed){const _0x1ed3e5=this;return new Promise(function(_0x48f75f,_0x48fc15){const _0x5aca1c=a44_0x1fc4;return db[_0x5aca1c('0x10')]['findAll']({'raw':_0x3073ed[_0x5aca1c('0x3')]?_0x3073ed['options'][_0x5aca1c('0x4')]===undefined?!![]:![]:!![],'where':_0x3073ed[_0x5aca1c('0x3')]?_0x3073ed[_0x5aca1c('0x3')][_0x5aca1c('0xe')]||null:null,'attributes':_0x3073ed['options']?_0x3073ed[_0x5aca1c('0x3')][_0x5aca1c('0x8')]||null:null,'limit':_0x3073ed['options']?_0x3073ed[_0x5aca1c('0x3')][_0x5aca1c('0x9')]||null:null,'include':_0x3073ed['options']?_0x3073ed[_0x5aca1c('0x3')][_0x5aca1c('0x7')]?_['map'](_0x3073ed['options'][_0x5aca1c('0x7')],function(_0xaf77a8){const _0x40adb7=_0x5aca1c;return{'model':db[_0xaf77a8[_0x40adb7('0xa')]],'as':_0xaf77a8['as'],'attributes':_0xaf77a8[_0x40adb7('0x8')],'include':_0xaf77a8[_0x40adb7('0x7')]?_[_0x40adb7('0x2')](_0xaf77a8['include'],function(_0x1cd451){const _0x1de6b6=_0x40adb7;return{'model':db[_0x1cd451[_0x1de6b6('0xa')]],'as':_0x1cd451['as'],'attributes':_0x1cd451[_0x1de6b6('0x8')],'include':_0x1cd451[_0x1de6b6('0x7')]?_['map'](_0x1cd451['include'],function(_0x21cd04){const _0x44ff78=_0x1de6b6;return{'model':db[_0x21cd04[_0x44ff78('0xa')]],'as':_0x21cd04['as'],'attributes':_0x21cd04[_0x44ff78('0x8')]};}):[]};}):[]};}):[]:[]})[_0x5aca1c('0x6')](function(_0x1ce3b9){const _0x3cecdd=_0x5aca1c;logger[_0x3cecdd('0x11')](_0x3cecdd('0xf'),_0x3073ed),logger[_0x3cecdd('0x5')](_0x3cecdd('0xf'),_0x3073ed,JSON['stringify'](_0x1ce3b9)),_0x48f75f(_0x1ce3b9);})[_0x5aca1c('0xd')](function(_0xedb638){const _0x2f9f86=_0x5aca1c;logger[_0x2f9f86('0xc')](_0x2f9f86('0xf'),_0xedb638[_0x2f9f86('0x1')],_0x3073ed),_0x48fc15(_0x1ed3e5[_0x2f9f86('0xc')](0x1f4,_0xedb638[_0x2f9f86('0x1')]));});});};
\ No newline at end of file
+const a44_0x2e70=['where','then','message','debug','lodash','GetCampaign','model','rpc','findAll','attributes','raw','../../config/logger','info','include','catch','map','error','options','limit','stringify'];(function(_0x2ab5c7,_0x2e701a){const _0x7424f=function(_0x37f2d7){while(--_0x37f2d7){_0x2ab5c7['push'](_0x2ab5c7['shift']());}};_0x7424f(++_0x2e701a);}(a44_0x2e70,0x1ef));const a44_0x7424=function(_0x2ab5c7,_0x2e701a){_0x2ab5c7=_0x2ab5c7-0x0;let _0x7424f=a44_0x2e70[_0x2ab5c7];return _0x7424f;};const _0x18b9ad=a44_0x7424;'use strict';const _=require(_0x18b9ad('0x9')),db=require('../../mysqldb')['db'],logger=require(_0x18b9ad('0x10'))(_0x18b9ad('0xc'));exports[_0x18b9ad('0xa')]=function(_0x37f2d7){const _0x1b4ab5=this;return new Promise(function(_0x1b7379,_0x1c71fd){const _0x41b4df=a44_0x7424;return db['Campaign'][_0x41b4df('0xd')]({'raw':_0x37f2d7[_0x41b4df('0x2')]?_0x37f2d7['options'][_0x41b4df('0xf')]===undefined?!![]:![]:!![],'where':_0x37f2d7[_0x41b4df('0x2')]?_0x37f2d7[_0x41b4df('0x2')][_0x41b4df('0x5')]||null:null,'attributes':_0x37f2d7[_0x41b4df('0x2')]?_0x37f2d7['options'][_0x41b4df('0xe')]||null:null,'limit':_0x37f2d7[_0x41b4df('0x2')]?_0x37f2d7[_0x41b4df('0x2')][_0x41b4df('0x3')]||null:null,'include':_0x37f2d7['options']?_0x37f2d7[_0x41b4df('0x2')][_0x41b4df('0x12')]?_[_0x41b4df('0x0')](_0x37f2d7[_0x41b4df('0x2')][_0x41b4df('0x12')],function(_0x5eb6f2){const _0x19c0d8=_0x41b4df;return{'model':db[_0x5eb6f2[_0x19c0d8('0xb')]],'as':_0x5eb6f2['as'],'attributes':_0x5eb6f2[_0x19c0d8('0xe')],'include':_0x5eb6f2[_0x19c0d8('0x12')]?_[_0x19c0d8('0x0')](_0x5eb6f2[_0x19c0d8('0x12')],function(_0x3bc8ed){const _0x20b3c0=_0x19c0d8;return{'model':db[_0x3bc8ed[_0x20b3c0('0xb')]],'as':_0x3bc8ed['as'],'attributes':_0x3bc8ed[_0x20b3c0('0xe')],'include':_0x3bc8ed['include']?_[_0x20b3c0('0x0')](_0x3bc8ed[_0x20b3c0('0x12')],function(_0x9d1df6){const _0x1c08db=_0x20b3c0;return{'model':db[_0x9d1df6[_0x1c08db('0xb')]],'as':_0x9d1df6['as'],'attributes':_0x9d1df6['attributes']};}):[]};}):[]};}):[]:[]})[_0x41b4df('0x6')](function(_0x3e7f1a){const _0x28fec9=_0x41b4df;logger[_0x28fec9('0x11')]('GetCampaign',_0x37f2d7),logger[_0x28fec9('0x8')](_0x28fec9('0xa'),_0x37f2d7,JSON[_0x28fec9('0x4')](_0x3e7f1a)),_0x1b7379(_0x3e7f1a);})[_0x41b4df('0x13')](function(_0x32e75b){const _0x3f3235=_0x41b4df;logger[_0x3f3235('0x1')](_0x3f3235('0xa'),_0x32e75b[_0x3f3235('0x7')],_0x37f2d7),_0x1c71fd(_0x1b4ab5['error'](0x1f4,_0x32e75b['message']));});});};
\ No newline at end of file