Built motion from commit b517aaa2a6638133380e4d135c64a80893061362. Version 3.0.0...
[motion-next.git] / server / api / plugin / plugin.rpc.js
1 const a518_0x2231=['register','stringify','CreatePlugin','debug','error','./plugin.socket','../../mysqldb','create','options','body','raw','../../rediscache','../../config/logger','rpc','then','Plugin'];(function(_0x60b76,_0x22313e){const _0x1d7a83=function(_0x591da5){while(--_0x591da5){_0x60b76['push'](_0x60b76['shift']());}};_0x1d7a83(++_0x22313e);}(a518_0x2231,0x1ee));const a518_0x1d7a=function(_0x60b76,_0x22313e){_0x60b76=_0x60b76-0x0;let _0x1d7a83=a518_0x2231[_0x60b76];return _0x1d7a83;};const _0x287360=a518_0x1d7a;'use strict';const db=require(_0x287360('0x8'))['db'],logger=require(_0x287360('0xe'))(_0x287360('0xf')),{getSocket}=require(_0x287360('0xd')),socket=getSocket();require(_0x287360('0x7'))[_0x287360('0x2')](socket),exports[_0x287360('0x4')]=function(_0x591da5){const _0x286e03=this;return new Promise(function(_0x1ceaba,_0x2028c6){const _0x1dccc1=a518_0x1d7a;return db[_0x1dccc1('0x1')][_0x1dccc1('0x9')](_0x591da5[_0x1dccc1('0xb')],{'raw':_0x591da5[_0x1dccc1('0xa')]?_0x591da5[_0x1dccc1('0xa')][_0x1dccc1('0xc')]===undefined?!![]:![]:!![]})[_0x1dccc1('0x0')](function(_0x3c9900){const _0x26e4d1=_0x1dccc1;logger['info']('CreatePlugin',_0x591da5),logger[_0x26e4d1('0x5')]('CreatePlugin',_0x591da5,JSON[_0x26e4d1('0x3')](_0x3c9900)),_0x1ceaba(_0x3c9900);})['catch'](function(_0x451a31){const _0x3aa8a5=_0x1dccc1;logger[_0x3aa8a5('0x6')](_0x3aa8a5('0x4'),_0x451a31['message'],_0x591da5),_0x2028c6(_0x286e03['error'](0x1f4,_0x451a31['message']));});});};