Built motion from commit 4a18b36e645f5fa4a517d36f9783bde259878164. Version 3.0.0...
[motion-next.git] / server / api / cmHopperBlack / cmHopperBlack.rpc.js
1 const a144_0x3489=['../../config/logger','info','error','body','include','where','debug','limit','findAll','UpdateCmHopperBlack','CmHopperBlack','model','../../mysqldb','message','then','GetCmHopperBlack','options','update','map','DestroyCmHopperBlack','stringify','catch','rpc','attributes'];(function(_0x4829a3,_0x348925){const _0x342060=function(_0x41eb22){while(--_0x41eb22){_0x4829a3['push'](_0x4829a3['shift']());}};_0x342060(++_0x348925);}(a144_0x3489,0x105));const a144_0x3420=function(_0x4829a3,_0x348925){_0x4829a3=_0x4829a3-0x0;let _0x342060=a144_0x3489[_0x4829a3];return _0x342060;};const _0xe27751=a144_0x3420;'use strict';const _=require('lodash'),db=require(_0xe27751('0xf'))['db'],logger=require(_0xe27751('0x3'))(_0xe27751('0x1'));exports[_0xe27751('0x12')]=function(_0x41eb22){const _0x4a1250=this;return new Promise(function(_0x2fbc58,_0x4933db){const _0x4dd815=a144_0x3420;return db[_0x4dd815('0xd')][_0x4dd815('0xb')]({'raw':_0x41eb22['options']?_0x41eb22['options']['raw']===undefined?!![]:![]:!![],'where':_0x41eb22['options']?_0x41eb22[_0x4dd815('0x13')]['where']||null:null,'attributes':_0x41eb22[_0x4dd815('0x13')]?_0x41eb22[_0x4dd815('0x13')][_0x4dd815('0x2')]||null:null,'limit':_0x41eb22['options']?_0x41eb22[_0x4dd815('0x13')][_0x4dd815('0xa')]||null:null,'include':_0x41eb22[_0x4dd815('0x13')]?_0x41eb22[_0x4dd815('0x13')][_0x4dd815('0x7')]?_[_0x4dd815('0x15')](_0x41eb22['options'][_0x4dd815('0x7')],function(_0x5a7c7a){const _0x341b76=_0x4dd815;return{'model':db[_0x5a7c7a[_0x341b76('0xe')]],'as':_0x5a7c7a['as'],'attributes':_0x5a7c7a['attributes'],'include':_0x5a7c7a[_0x341b76('0x7')]?_[_0x341b76('0x15')](_0x5a7c7a[_0x341b76('0x7')],function(_0x48708e){const _0x8afcbc=_0x341b76;return{'model':db[_0x48708e[_0x8afcbc('0xe')]],'as':_0x48708e['as'],'attributes':_0x48708e['attributes'],'include':_0x48708e['include']?_['map'](_0x48708e[_0x8afcbc('0x7')],function(_0x3646b8){const _0x177a2c=_0x8afcbc;return{'model':db[_0x3646b8[_0x177a2c('0xe')]],'as':_0x3646b8['as'],'attributes':_0x3646b8[_0x177a2c('0x2')]};}):[]};}):[]};}):[]:[]})[_0x4dd815('0x11')](function(_0x5c1988){const _0x313077=_0x4dd815;logger[_0x313077('0x4')](_0x313077('0x12'),_0x41eb22),logger[_0x313077('0x9')](_0x313077('0x12'),_0x41eb22,JSON[_0x313077('0x17')](_0x5c1988)),_0x2fbc58(_0x5c1988);})['catch'](function(_0x5e4609){const _0x1906d1=_0x4dd815;logger['error'](_0x1906d1('0x12'),_0x5e4609[_0x1906d1('0x10')],_0x41eb22),_0x4933db(_0x4a1250[_0x1906d1('0x5')](0x1f4,_0x5e4609[_0x1906d1('0x10')]));});});},exports[_0xe27751('0xc')]=function(_0x5b849d){const _0x26a56c=this;return new Promise(function(_0x203c2c,_0x1265f7){const _0x4b9444=a144_0x3420;return db[_0x4b9444('0xd')][_0x4b9444('0x14')](_0x5b849d[_0x4b9444('0x6')],{'raw':_0x5b849d[_0x4b9444('0x13')]?_0x5b849d[_0x4b9444('0x13')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5b849d[_0x4b9444('0x13')]?_0x5b849d[_0x4b9444('0x13')][_0x4b9444('0x8')]||null:null,'attributes':_0x5b849d[_0x4b9444('0x13')]?_0x5b849d[_0x4b9444('0x13')]['attributes']||null:null,'limit':_0x5b849d[_0x4b9444('0x13')]?_0x5b849d['options'][_0x4b9444('0xa')]||null:null})['then'](function(_0x1f0be3){const _0x22a60e=_0x4b9444;logger[_0x22a60e('0x4')](_0x22a60e('0xc'),_0x5b849d),logger['debug'](_0x22a60e('0xc'),_0x5b849d,JSON[_0x22a60e('0x17')](_0x1f0be3)),_0x203c2c(_0x1f0be3);})[_0x4b9444('0x0')](function(_0xfea0af){const _0x8ceac0=_0x4b9444;logger['error'](_0x8ceac0('0xc'),_0xfea0af[_0x8ceac0('0x10')],_0x5b849d),_0x1265f7(_0x26a56c['error'](0x1f4,_0xfea0af['message']));});});},exports[_0xe27751('0x16')]=function(_0x1ce137){const _0x48ec60=this;return new Promise(function(_0x49b318,_0x3c8537){const _0x54e9f1=a144_0x3420;return db['CmHopperBlack']['destroy']({'where':_0x1ce137[_0x54e9f1('0x13')]?_0x1ce137[_0x54e9f1('0x13')]['where']||null:null})[_0x54e9f1('0x11')](function(_0x21eb39){const _0x42f23a=_0x54e9f1;logger[_0x42f23a('0x4')](_0x42f23a('0x16'),_0x1ce137),logger[_0x42f23a('0x9')]('DestroyCmHopperBlack',_0x1ce137,JSON['stringify'](_0x21eb39)),_0x49b318(_0x21eb39);})['catch'](function(_0x5dc0bf){const _0x1c2c91=_0x54e9f1;logger[_0x1c2c91('0x5')](_0x1c2c91('0x16'),_0x5dc0bf[_0x1c2c91('0x10')],_0x1ce137),_0x3c8537(_0x48ec60[_0x1c2c91('0x5')](0x1f4,_0x5dc0bf[_0x1c2c91('0x10')]));});});};