Built motion from commit f738f9592c388b9f9eb3948f400a5c9d717a3561. Version 3.0.0...
[motion-next.git] / server / api / mailInteraction / mailInteraction.rpc.js
index 3ce360c..9934bfe 100644 (file)
@@ -1 +1 @@
-const a493_0x21a2=['then','stringify','rpc','MailInteraction','AddTags','catch','findOne','UpdateMailInteraction','limit','register','attributes','raw','options','debug','../../config/logger','omit','ids','../../mysqldb','message','addTags','error','body'];(function(_0x375d0d,_0x57d30f){const _0x21a22c=function(_0x239525){while(--_0x239525){_0x375d0d['push'](_0x375d0d['shift']());}};_0x21a22c(++_0x57d30f);}(a493_0x21a2,0x15f));const a493_0x2395=function(_0x375d0d,_0x57d30f){_0x375d0d=_0x375d0d-0xf2;let _0x21a22c=a493_0x21a2[_0x375d0d];return _0x21a22c;};const a493_0x4911ae=a493_0x2395;'use strict';const _=require('lodash'),db=require(a493_0x4911ae(0x104))['db'],logger=require(a493_0x4911ae(0x101))(a493_0x4911ae(0xf5)),{getSocket}=require('../../rediscache'),socket=getSocket();require('./mailInteraction.socket')[a493_0x4911ae(0xfc)](socket),exports['UpdateMailInteraction']=function(_0x51cabb){const _0x21e1ce=this;return new Promise(function(_0x1d4d96,_0x4f2c87){const _0x1120e8=a493_0x2395;return db[_0x1120e8(0xf6)]['update'](_0x51cabb[_0x1120e8(0xf2)],{'raw':_0x51cabb[_0x1120e8(0xff)]?_0x51cabb[_0x1120e8(0xff)][_0x1120e8(0xfe)]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x51cabb['options']?_0x51cabb[_0x1120e8(0xff)]['where']||null:null,'attributes':_0x51cabb[_0x1120e8(0xff)]?_0x51cabb[_0x1120e8(0xff)][_0x1120e8(0xfd)]||null:null,'limit':_0x51cabb['options']?_0x51cabb['options'][_0x1120e8(0xfb)]||null:null})['then'](function(_0x189575){const _0x410a3a=_0x1120e8;logger['info'](_0x410a3a(0xfa),_0x51cabb),logger[_0x410a3a(0x100)](_0x410a3a(0xfa),_0x51cabb,JSON[_0x410a3a(0xf4)](_0x189575)),_0x1d4d96(_0x189575);})[_0x1120e8(0xf8)](function(_0x4e7abb){const _0x310c4c=_0x1120e8;logger[_0x310c4c(0x107)](_0x310c4c(0xfa),_0x4e7abb['message'],_0x51cabb),_0x4f2c87(_0x21e1ce['error'](0x1f4,_0x4e7abb[_0x310c4c(0x105)]));});});},exports['AddTagsToMailInteraction']=function(_0xd96195){const _0x28d0ad=this;return new Promise(function(_0x505c2e,_0x48bc77){const _0x3bb25e=a493_0x2395;return db[_0x3bb25e(0xf6)][_0x3bb25e(0xf9)]({'where':_0xd96195['options']?_0xd96195[_0x3bb25e(0xff)]['where']||null:null})['then'](function(_0x40b1db){const _0x934058=_0x3bb25e;if(_0x40b1db)return _0x40b1db[_0x934058(0x106)](_0xd96195[_0x934058(0xf2)][_0x934058(0x103)],{'through':_[_0x934058(0x102)](_0xd96195['body'],[_0x934058(0x103),'id'])});})[_0x3bb25e(0xf3)](function([_0x38fdca]){const _0x5d4440=_0x3bb25e;logger['info'](_0x5d4440(0xf7),_0xd96195),logger['debug']('AddTags',_0xd96195,JSON[_0x5d4440(0xf4)](_0x38fdca)),_0x505c2e(_0x38fdca);})['catch'](function(_0x11da62){const _0x1c321a=_0x3bb25e;logger[_0x1c321a(0x107)]('AddTags',_0x11da62[_0x1c321a(0x105)],_0xd96195),_0x48bc77(_0x28d0ad[_0x1c321a(0x107)](0x1f4,_0x11da62[_0x1c321a(0x105)]));});});};
\ No newline at end of file
+const a493_0x5f1c=['error','rpc','debug','../../mysqldb','MailInteraction','update','options','raw','stringify','UpdateMailInteraction','info','body','../../config/logger','addTags','findOne','AddTags','AddTagsToMailInteraction','omit','ids','lodash','message','then','where','../../rediscache'];(function(_0x202351,_0x5f0912){const _0x5f1c3c=function(_0x2b7d36){while(--_0x2b7d36){_0x202351['push'](_0x202351['shift']());}};_0x5f1c3c(++_0x5f0912);}(a493_0x5f1c,0xfa));const a493_0x2b7d=function(_0x202351,_0x5f0912){_0x202351=_0x202351-0x81;let _0x5f1c3c=a493_0x5f1c[_0x202351];return _0x5f1c3c;};const a493_0x14d6d4=a493_0x2b7d;'use strict';const _=require(a493_0x14d6d4(0x8a)),db=require(a493_0x14d6d4(0x92))['db'],logger=require(a493_0x14d6d4(0x83))(a493_0x14d6d4(0x90)),{getSocket}=require(a493_0x14d6d4(0x8e)),socket=getSocket();require('./mailInteraction.socket')['register'](socket),exports[a493_0x14d6d4(0x98)]=function(_0x3ef64b){const _0x5f575e=this;return new Promise(function(_0x37e3e5,_0x54f5ba){const _0x3756b8=a493_0x2b7d;return db[_0x3756b8(0x93)][_0x3756b8(0x94)](_0x3ef64b[_0x3756b8(0x82)],{'raw':_0x3ef64b[_0x3756b8(0x95)]?_0x3ef64b[_0x3756b8(0x95)][_0x3756b8(0x96)]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3ef64b[_0x3756b8(0x95)]?_0x3ef64b[_0x3756b8(0x95)][_0x3756b8(0x8d)]||null:null,'attributes':_0x3ef64b[_0x3756b8(0x95)]?_0x3ef64b[_0x3756b8(0x95)]['attributes']||null:null,'limit':_0x3ef64b[_0x3756b8(0x95)]?_0x3ef64b[_0x3756b8(0x95)]['limit']||null:null})[_0x3756b8(0x8c)](function(_0x4067ae){const _0x1ef6e2=_0x3756b8;logger[_0x1ef6e2(0x81)](_0x1ef6e2(0x98),_0x3ef64b),logger[_0x1ef6e2(0x91)](_0x1ef6e2(0x98),_0x3ef64b,JSON[_0x1ef6e2(0x97)](_0x4067ae)),_0x37e3e5(_0x4067ae);})['catch'](function(_0x13376e){const _0xe1dc1a=_0x3756b8;logger[_0xe1dc1a(0x8f)](_0xe1dc1a(0x98),_0x13376e[_0xe1dc1a(0x8b)],_0x3ef64b),_0x54f5ba(_0x5f575e[_0xe1dc1a(0x8f)](0x1f4,_0x13376e[_0xe1dc1a(0x8b)]));});});},exports[a493_0x14d6d4(0x87)]=function(_0x11667d){const _0x430e3e=this;return new Promise(function(_0xe53415,_0x2306a5){const _0x514751=a493_0x2b7d;return db[_0x514751(0x93)][_0x514751(0x85)]({'where':_0x11667d['options']?_0x11667d[_0x514751(0x95)][_0x514751(0x8d)]||null:null})[_0x514751(0x8c)](function(_0x4c00e9){const _0x5203c5=_0x514751;if(_0x4c00e9)return _0x4c00e9[_0x5203c5(0x84)](_0x11667d[_0x5203c5(0x82)][_0x5203c5(0x89)],{'through':_[_0x5203c5(0x88)](_0x11667d[_0x5203c5(0x82)],['ids','id'])});})[_0x514751(0x8c)](function([_0x243072]){const _0x46e479=_0x514751;logger['info'](_0x46e479(0x86),_0x11667d),logger[_0x46e479(0x91)](_0x46e479(0x86),_0x11667d,JSON[_0x46e479(0x97)](_0x243072)),_0xe53415(_0x243072);})['catch'](function(_0x2b0531){const _0x1aa500=_0x514751;logger['error'](_0x1aa500(0x86),_0x2b0531[_0x1aa500(0x8b)],_0x11667d),_0x2306a5(_0x430e3e['error'](0x1f4,_0x2b0531['message']));});});};
\ No newline at end of file