Built motion from commit f651e4b0a7312c0adceb5e57d6684a801a3aaf0d. Version 3.0.0...
[motion-next.git] / server / api / memberReport / memberReport.rpc.js
1 const a450_0x1c9b=['raw','CreateMemberReport','error','map','then','attributes','limit','create','where','update','../../mysqldb','lodash','UpdateMemberReport','options','../../config/logger','debug','rpc','MemberReport','findAll','message','stringify','GetMemberReport','info','include','catch','body'];(function(_0xb185c5,_0x1c9b2d){const _0x5852a6=function(_0x4b7d05){while(--_0x4b7d05){_0xb185c5['push'](_0xb185c5['shift']());}};_0x5852a6(++_0x1c9b2d);}(a450_0x1c9b,0x1a7));const a450_0x5852=function(_0xb185c5,_0x1c9b2d){_0xb185c5=_0xb185c5-0x0;let _0x5852a6=a450_0x1c9b[_0xb185c5];return _0x5852a6;};const _0x25a332=a450_0x5852;'use strict';const _=require(_0x25a332('0x4')),db=require(_0x25a332('0x3'))['db'],logger=require(_0x25a332('0x7'))(_0x25a332('0x9'));exports[_0x25a332('0xe')]=function(_0x4b7d05){const _0x39da73=this;return new Promise(function(_0x4ead3b,_0x3343b3){const _0x1befd5=a450_0x5852;return db[_0x1befd5('0xa')][_0x1befd5('0xb')]({'raw':_0x4b7d05['options']?_0x4b7d05[_0x1befd5('0x6')][_0x1befd5('0x13')]===undefined?!![]:![]:!![],'where':_0x4b7d05[_0x1befd5('0x6')]?_0x4b7d05['options'][_0x1befd5('0x1')]||null:null,'attributes':_0x4b7d05[_0x1befd5('0x6')]?_0x4b7d05[_0x1befd5('0x6')][_0x1befd5('0x18')]||null:null,'limit':_0x4b7d05['options']?_0x4b7d05[_0x1befd5('0x6')]['limit']||null:null,'include':_0x4b7d05[_0x1befd5('0x6')]?_0x4b7d05[_0x1befd5('0x6')][_0x1befd5('0x10')]?_[_0x1befd5('0x16')](_0x4b7d05['options'][_0x1befd5('0x10')],function(_0x8a4d62){const _0x34f1d1=_0x1befd5;return{'model':db[_0x8a4d62['model']],'as':_0x8a4d62['as'],'attributes':_0x8a4d62[_0x34f1d1('0x18')],'include':_0x8a4d62['include']?_[_0x34f1d1('0x16')](_0x8a4d62[_0x34f1d1('0x10')],function(_0x140571){const _0x3d208d=_0x34f1d1;return{'model':db[_0x140571['model']],'as':_0x140571['as'],'attributes':_0x140571[_0x3d208d('0x18')],'include':_0x140571['include']?_[_0x3d208d('0x16')](_0x140571[_0x3d208d('0x10')],function(_0x2ea5c3){const _0x4ed236=_0x3d208d;return{'model':db[_0x2ea5c3['model']],'as':_0x2ea5c3['as'],'attributes':_0x2ea5c3[_0x4ed236('0x18')]};}):[]};}):[]};}):[]:[]})[_0x1befd5('0x17')](function(_0x340461){const _0x4870f5=_0x1befd5;logger[_0x4870f5('0xf')](_0x4870f5('0xe'),_0x4b7d05),logger[_0x4870f5('0x8')](_0x4870f5('0xe'),_0x4b7d05,JSON['stringify'](_0x340461)),_0x4ead3b(_0x340461);})[_0x1befd5('0x11')](function(_0x84ae12){const _0x2b9a08=_0x1befd5;logger['error'](_0x2b9a08('0xe'),_0x84ae12[_0x2b9a08('0xc')],_0x4b7d05),_0x3343b3(_0x39da73['error'](0x1f4,_0x84ae12[_0x2b9a08('0xc')]));});});},exports[_0x25a332('0x14')]=function(_0x1249c5){const _0x21a6c6=this;return new Promise(function(_0x44020e,_0x384dc5){const _0x351278=a450_0x5852;return db[_0x351278('0xa')][_0x351278('0x0')](_0x1249c5[_0x351278('0x12')],{'raw':_0x1249c5['options']?_0x1249c5[_0x351278('0x6')]['raw']===undefined?!![]:![]:!![]})[_0x351278('0x17')](function(_0x52e26c){const _0x4879ff=_0x351278;logger[_0x4879ff('0xf')]('CreateMemberReport',_0x1249c5),logger[_0x4879ff('0x8')](_0x4879ff('0x14'),_0x1249c5,JSON['stringify'](_0x52e26c)),_0x44020e(_0x52e26c);})[_0x351278('0x11')](function(_0x143c70){const _0x595c54=_0x351278;logger[_0x595c54('0x15')](_0x595c54('0x14'),_0x143c70[_0x595c54('0xc')],_0x1249c5),_0x384dc5(_0x21a6c6[_0x595c54('0x15')](0x1f4,_0x143c70[_0x595c54('0xc')]));});});},exports[_0x25a332('0x5')]=function(_0x110352){const _0x47b8ab=this;return new Promise(function(_0x103d5b,_0x51d8d8){const _0xc5fb1a=a450_0x5852;return db[_0xc5fb1a('0xa')][_0xc5fb1a('0x2')](_0x110352[_0xc5fb1a('0x12')],{'raw':_0x110352[_0xc5fb1a('0x6')]?_0x110352[_0xc5fb1a('0x6')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x110352[_0xc5fb1a('0x6')]?_0x110352['options'][_0xc5fb1a('0x1')]||null:null,'attributes':_0x110352[_0xc5fb1a('0x6')]?_0x110352[_0xc5fb1a('0x6')]['attributes']||null:null,'limit':_0x110352[_0xc5fb1a('0x6')]?_0x110352[_0xc5fb1a('0x6')][_0xc5fb1a('0x19')]||null:null})[_0xc5fb1a('0x17')](function(_0x2d7980){const _0x52c3e9=_0xc5fb1a;logger[_0x52c3e9('0xf')]('UpdateMemberReport',_0x110352),logger[_0x52c3e9('0x8')](_0x52c3e9('0x5'),_0x110352,JSON[_0x52c3e9('0xd')](_0x2d7980)),_0x103d5b(_0x2d7980);})['catch'](function(_0x5889f9){const _0x2e4ac9=_0xc5fb1a;logger[_0x2e4ac9('0x15')](_0x2e4ac9('0x5'),_0x5889f9[_0x2e4ac9('0xc')],_0x110352),_0x51d8d8(_0x47b8ab[_0x2e4ac9('0x15')](0x1f4,_0x5889f9[_0x2e4ac9('0xc')]));});});};