Built motion from commit df3e9871f6bcc3432fec345b2f4facbd4dba8b5c. Version 3.0.0...
[motion-next.git] / server / api / campaign / campaign.rpc.js
1 const a44_0x51c2=['attributes','error','raw','debug','info','then','findAll','../../config/logger','stringify','message','include','options','model','GetCampaign','catch','limit','where','Campaign','map'];(function(_0x22de4e,_0x51c232){const _0x47f586=function(_0x2c6d2e){while(--_0x2c6d2e){_0x22de4e['push'](_0x22de4e['shift']());}};_0x47f586(++_0x51c232);}(a44_0x51c2,0xfc));const a44_0x47f5=function(_0x22de4e,_0x51c232){_0x22de4e=_0x22de4e-0x0;let _0x47f586=a44_0x51c2[_0x22de4e];return _0x47f586;};const _0x2be78d=a44_0x47f5;'use strict';const _=require('lodash'),db=require('../../mysqldb')['db'],logger=require(_0x2be78d('0x2'))('rpc');exports[_0x2be78d('0x8')]=function(_0x2c6d2e){const _0x28edf0=this;return new Promise(function(_0xcd3ab3,_0x17f673){const _0x2a7b98=a44_0x47f5;return db[_0x2a7b98('0xc')][_0x2a7b98('0x1')]({'raw':_0x2c6d2e[_0x2a7b98('0x6')]?_0x2c6d2e[_0x2a7b98('0x6')][_0x2a7b98('0x10')]===undefined?!![]:![]:!![],'where':_0x2c6d2e[_0x2a7b98('0x6')]?_0x2c6d2e[_0x2a7b98('0x6')][_0x2a7b98('0xb')]||null:null,'attributes':_0x2c6d2e[_0x2a7b98('0x6')]?_0x2c6d2e[_0x2a7b98('0x6')][_0x2a7b98('0xe')]||null:null,'limit':_0x2c6d2e['options']?_0x2c6d2e['options'][_0x2a7b98('0xa')]||null:null,'include':_0x2c6d2e[_0x2a7b98('0x6')]?_0x2c6d2e[_0x2a7b98('0x6')][_0x2a7b98('0x5')]?_[_0x2a7b98('0xd')](_0x2c6d2e[_0x2a7b98('0x6')][_0x2a7b98('0x5')],function(_0x540b83){const _0x47de7b=_0x2a7b98;return{'model':db[_0x540b83[_0x47de7b('0x7')]],'as':_0x540b83['as'],'attributes':_0x540b83[_0x47de7b('0xe')],'include':_0x540b83[_0x47de7b('0x5')]?_['map'](_0x540b83['include'],function(_0x46ca66){const _0x195847=_0x47de7b;return{'model':db[_0x46ca66[_0x195847('0x7')]],'as':_0x46ca66['as'],'attributes':_0x46ca66[_0x195847('0xe')],'include':_0x46ca66[_0x195847('0x5')]?_[_0x195847('0xd')](_0x46ca66[_0x195847('0x5')],function(_0x81ceae){const _0x3e653a=_0x195847;return{'model':db[_0x81ceae[_0x3e653a('0x7')]],'as':_0x81ceae['as'],'attributes':_0x81ceae[_0x3e653a('0xe')]};}):[]};}):[]};}):[]:[]})[_0x2a7b98('0x0')](function(_0x14fa84){const _0x1f7580=_0x2a7b98;logger[_0x1f7580('0x12')](_0x1f7580('0x8'),_0x2c6d2e),logger[_0x1f7580('0x11')](_0x1f7580('0x8'),_0x2c6d2e,JSON[_0x1f7580('0x3')](_0x14fa84)),_0xcd3ab3(_0x14fa84);})[_0x2a7b98('0x9')](function(_0x3cfc42){const _0x13de79=_0x2a7b98;logger[_0x13de79('0xf')](_0x13de79('0x8'),_0x3cfc42[_0x13de79('0x4')],_0x2c6d2e),_0x17f673(_0x28edf0['error'](0x1f4,_0x3cfc42[_0x13de79('0x4')]));});});};