Built motion from commit b517aaa2a6638133380e4d135c64a80893061362. Version 3.0.0...
[motion-next.git] / server / api / cmHopperBlack / cmHopperBlack.rpc.js
1 const a144_0x4358=['raw','options','limit','message','../../mysqldb','include','UpdateCmHopperBlack','lodash','map','info','body','stringify','CmHopperBlack','catch','GetCmHopperBlack','attributes','error','model','rpc','DestroyCmHopperBlack','update','debug','where','then'];(function(_0x2c2e29,_0x435854){const _0x43845a=function(_0x30c44d){while(--_0x30c44d){_0x2c2e29['push'](_0x2c2e29['shift']());}};_0x43845a(++_0x435854);}(a144_0x4358,0x162));const a144_0x4384=function(_0x2c2e29,_0x435854){_0x2c2e29=_0x2c2e29-0x0;let _0x43845a=a144_0x4358[_0x2c2e29];return _0x43845a;};const _0x33fc71=a144_0x4384;'use strict';const _=require(_0x33fc71('0xd')),db=require(_0x33fc71('0xa'))['db'],logger=require('../../config/logger')(_0x33fc71('0x0'));exports[_0x33fc71('0x14')]=function(_0x30c44d){const _0x408f0e=this;return new Promise(function(_0x2904cb,_0x1c239c){const _0x255b39=a144_0x4384;return db[_0x255b39('0x12')]['findAll']({'raw':_0x30c44d[_0x255b39('0x7')]?_0x30c44d['options'][_0x255b39('0x6')]===undefined?!![]:![]:!![],'where':_0x30c44d['options']?_0x30c44d[_0x255b39('0x7')][_0x255b39('0x4')]||null:null,'attributes':_0x30c44d[_0x255b39('0x7')]?_0x30c44d[_0x255b39('0x7')][_0x255b39('0x15')]||null:null,'limit':_0x30c44d[_0x255b39('0x7')]?_0x30c44d[_0x255b39('0x7')][_0x255b39('0x8')]||null:null,'include':_0x30c44d[_0x255b39('0x7')]?_0x30c44d['options'][_0x255b39('0xb')]?_[_0x255b39('0xe')](_0x30c44d[_0x255b39('0x7')]['include'],function(_0xaff1ad){const _0x18dd34=_0x255b39;return{'model':db[_0xaff1ad['model']],'as':_0xaff1ad['as'],'attributes':_0xaff1ad['attributes'],'include':_0xaff1ad[_0x18dd34('0xb')]?_[_0x18dd34('0xe')](_0xaff1ad[_0x18dd34('0xb')],function(_0x442cb8){const _0x2d7852=_0x18dd34;return{'model':db[_0x442cb8[_0x2d7852('0x17')]],'as':_0x442cb8['as'],'attributes':_0x442cb8[_0x2d7852('0x15')],'include':_0x442cb8[_0x2d7852('0xb')]?_[_0x2d7852('0xe')](_0x442cb8['include'],function(_0x1b855c){const _0x5347cb=_0x2d7852;return{'model':db[_0x1b855c[_0x5347cb('0x17')]],'as':_0x1b855c['as'],'attributes':_0x1b855c['attributes']};}):[]};}):[]};}):[]:[]})[_0x255b39('0x5')](function(_0x3ecf28){const _0x182c83=_0x255b39;logger['info']('GetCmHopperBlack',_0x30c44d),logger['debug'](_0x182c83('0x14'),_0x30c44d,JSON[_0x182c83('0x11')](_0x3ecf28)),_0x2904cb(_0x3ecf28);})[_0x255b39('0x13')](function(_0x2ea6dd){const _0x3d2cd2=_0x255b39;logger[_0x3d2cd2('0x16')](_0x3d2cd2('0x14'),_0x2ea6dd['message'],_0x30c44d),_0x1c239c(_0x408f0e[_0x3d2cd2('0x16')](0x1f4,_0x2ea6dd['message']));});});},exports[_0x33fc71('0xc')]=function(_0x2c3c7a){const _0x456f08=this;return new Promise(function(_0x2d48bb,_0xf06002){const _0x2fd7fe=a144_0x4384;return db[_0x2fd7fe('0x12')][_0x2fd7fe('0x2')](_0x2c3c7a[_0x2fd7fe('0x10')],{'raw':_0x2c3c7a[_0x2fd7fe('0x7')]?_0x2c3c7a[_0x2fd7fe('0x7')][_0x2fd7fe('0x6')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2c3c7a[_0x2fd7fe('0x7')]?_0x2c3c7a[_0x2fd7fe('0x7')][_0x2fd7fe('0x4')]||null:null,'attributes':_0x2c3c7a[_0x2fd7fe('0x7')]?_0x2c3c7a[_0x2fd7fe('0x7')][_0x2fd7fe('0x15')]||null:null,'limit':_0x2c3c7a[_0x2fd7fe('0x7')]?_0x2c3c7a[_0x2fd7fe('0x7')][_0x2fd7fe('0x8')]||null:null})[_0x2fd7fe('0x5')](function(_0x521db6){const _0x5515f7=_0x2fd7fe;logger['info'](_0x5515f7('0xc'),_0x2c3c7a),logger[_0x5515f7('0x3')](_0x5515f7('0xc'),_0x2c3c7a,JSON[_0x5515f7('0x11')](_0x521db6)),_0x2d48bb(_0x521db6);})[_0x2fd7fe('0x13')](function(_0x577b18){const _0x4817a9=_0x2fd7fe;logger[_0x4817a9('0x16')]('UpdateCmHopperBlack',_0x577b18[_0x4817a9('0x9')],_0x2c3c7a),_0xf06002(_0x456f08[_0x4817a9('0x16')](0x1f4,_0x577b18[_0x4817a9('0x9')]));});});},exports[_0x33fc71('0x1')]=function(_0x17cdd7){const _0x32ceec=this;return new Promise(function(_0x1e73ac,_0x5f59f3){const _0x1a2fce=a144_0x4384;return db[_0x1a2fce('0x12')]['destroy']({'where':_0x17cdd7[_0x1a2fce('0x7')]?_0x17cdd7[_0x1a2fce('0x7')][_0x1a2fce('0x4')]||null:null})[_0x1a2fce('0x5')](function(_0x6a738c){const _0x57d04e=_0x1a2fce;logger[_0x57d04e('0xf')](_0x57d04e('0x1'),_0x17cdd7),logger[_0x57d04e('0x3')](_0x57d04e('0x1'),_0x17cdd7,JSON['stringify'](_0x6a738c)),_0x1e73ac(_0x6a738c);})['catch'](function(_0x19932c){const _0x331901=_0x1a2fce;logger[_0x331901('0x16')]('DestroyCmHopperBlack',_0x19932c['message'],_0x17cdd7),_0x5f59f3(_0x32ceec[_0x331901('0x16')](0x1f4,_0x19932c[_0x331901('0x9')]));});});};