Built motion from commit df3e9871f6bcc3432fec345b2f4facbd4dba8b5c. Version 3.0.0...
[motion-next.git] / server / api / mailInteraction / mailInteraction.rpc.js
index efd6e26..9a69407 100644 (file)
@@ -1 +1 @@
-const a409_0x38c4=['omit','../../rediscache','body','../../mysqldb','register','stringify','info','update','AddTagsToMailInteraction','error','MailInteraction','limit','UpdateMailInteraction','AddTags','../../config/logger','./mailInteraction.socket','then','message','where','findOne','attributes','debug','raw','lodash','options'];(function(_0x39c048,_0x38c45e){const _0x329252=function(_0x30af7f){while(--_0x30af7f){_0x39c048['push'](_0x39c048['shift']());}};_0x329252(++_0x38c45e);}(a409_0x38c4,0x18a));const a409_0x3292=function(_0x39c048,_0x38c45e){_0x39c048=_0x39c048-0x0;let _0x329252=a409_0x38c4[_0x39c048];return _0x329252;};const _0x354a9f=a409_0x3292;'use strict';const _=require(_0x354a9f('0x4')),db=require(_0x354a9f('0x9'))['db'],logger=require(_0x354a9f('0x14'))('rpc'),{getSocket}=require(_0x354a9f('0x7')),socket=getSocket();require(_0x354a9f('0x15'))[_0x354a9f('0xa')](socket),exports['UpdateMailInteraction']=function(_0x30af7f){const _0x34de31=this;return new Promise(function(_0x293da2,_0x5e1628){const _0x354958=a409_0x3292;return db[_0x354958('0x10')][_0x354958('0xd')](_0x30af7f['body'],{'raw':_0x30af7f[_0x354958('0x5')]?_0x30af7f['options'][_0x354958('0x3')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x30af7f['options']?_0x30af7f[_0x354958('0x5')][_0x354958('0x18')]||null:null,'attributes':_0x30af7f[_0x354958('0x5')]?_0x30af7f[_0x354958('0x5')][_0x354958('0x1')]||null:null,'limit':_0x30af7f[_0x354958('0x5')]?_0x30af7f[_0x354958('0x5')][_0x354958('0x11')]||null:null})[_0x354958('0x16')](function(_0x198e57){const _0x57f230=_0x354958;logger['info']('UpdateMailInteraction',_0x30af7f),logger['debug'](_0x57f230('0x12'),_0x30af7f,JSON[_0x57f230('0xb')](_0x198e57)),_0x293da2(_0x198e57);})['catch'](function(_0x3e47c9){const _0x427d39=_0x354958;logger[_0x427d39('0xf')](_0x427d39('0x12'),_0x3e47c9[_0x427d39('0x17')],_0x30af7f),_0x5e1628(_0x34de31[_0x427d39('0xf')](0x1f4,_0x3e47c9['message']));});});},exports[_0x354a9f('0xe')]=function(_0x20a6be){const _0x12e996=this;return new Promise(function(_0xcd6da7,_0x1d6007){const _0x35a787=a409_0x3292;return db[_0x35a787('0x10')][_0x35a787('0x0')]({'where':_0x20a6be[_0x35a787('0x5')]?_0x20a6be['options'][_0x35a787('0x18')]||null:null})[_0x35a787('0x16')](function(_0x20cfda){const _0x173446=_0x35a787;if(_0x20cfda)return _0x20cfda['addTags'](_0x20a6be[_0x173446('0x8')]['ids'],{'through':_[_0x173446('0x6')](_0x20a6be['body'],['ids','id'])});})[_0x35a787('0x16')](function([_0x1e3516]){const _0x2d69c0=_0x35a787;logger[_0x2d69c0('0xc')](_0x2d69c0('0x13'),_0x20a6be),logger[_0x2d69c0('0x2')](_0x2d69c0('0x13'),_0x20a6be,JSON['stringify'](_0x1e3516)),_0xcd6da7(_0x1e3516);})['catch'](function(_0x3fa82f){const _0x1a0fd8=_0x35a787;logger[_0x1a0fd8('0xf')](_0x1a0fd8('0x13'),_0x3fa82f[_0x1a0fd8('0x17')],_0x20a6be),_0x1d6007(_0x12e996['error'](0x1f4,_0x3fa82f[_0x1a0fd8('0x17')]));});});};
\ No newline at end of file
+const a409_0x27c2=['../../mysqldb','omit','../../config/logger','error','AddTags','where','rpc','debug','catch','then','body','register','message','AddTagsToMailInteraction','stringify','attributes','./mailInteraction.socket','../../rediscache','raw','update','ids','info','options','UpdateMailInteraction','MailInteraction'];(function(_0x50d879,_0x27c2eb){const _0x494cfd=function(_0x5b560d){while(--_0x5b560d){_0x50d879['push'](_0x50d879['shift']());}};_0x494cfd(++_0x27c2eb);}(a409_0x27c2,0x1a7));const a409_0x494c=function(_0x50d879,_0x27c2eb){_0x50d879=_0x50d879-0x0;let _0x494cfd=a409_0x27c2[_0x50d879];return _0x494cfd;};const _0x480361=a409_0x494c;'use strict';const _=require('lodash'),db=require(_0x480361('0x2'))['db'],logger=require(_0x480361('0x4'))(_0x480361('0x8')),{getSocket}=require(_0x480361('0x13')),socket=getSocket();require(_0x480361('0x12'))[_0x480361('0xd')](socket),exports['UpdateMailInteraction']=function(_0x5b560d){const _0x29b7ee=this;return new Promise(function(_0x47c535,_0x2da7ea){const _0x10f238=a409_0x494c;return db[_0x10f238('0x1')][_0x10f238('0x15')](_0x5b560d[_0x10f238('0xc')],{'raw':_0x5b560d[_0x10f238('0x18')]?_0x5b560d['options'][_0x10f238('0x14')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5b560d[_0x10f238('0x18')]?_0x5b560d[_0x10f238('0x18')][_0x10f238('0x7')]||null:null,'attributes':_0x5b560d[_0x10f238('0x18')]?_0x5b560d[_0x10f238('0x18')][_0x10f238('0x11')]||null:null,'limit':_0x5b560d['options']?_0x5b560d[_0x10f238('0x18')]['limit']||null:null})[_0x10f238('0xb')](function(_0x11236f){const _0x31fc53=_0x10f238;logger[_0x31fc53('0x17')](_0x31fc53('0x0'),_0x5b560d),logger[_0x31fc53('0x9')](_0x31fc53('0x0'),_0x5b560d,JSON[_0x31fc53('0x10')](_0x11236f)),_0x47c535(_0x11236f);})[_0x10f238('0xa')](function(_0x4fc7ca){const _0x8d6762=_0x10f238;logger[_0x8d6762('0x5')](_0x8d6762('0x0'),_0x4fc7ca[_0x8d6762('0xe')],_0x5b560d),_0x2da7ea(_0x29b7ee[_0x8d6762('0x5')](0x1f4,_0x4fc7ca[_0x8d6762('0xe')]));});});},exports[_0x480361('0xf')]=function(_0x24f37c){const _0x56159b=this;return new Promise(function(_0x22d192,_0x11d84a){const _0x59d2e7=a409_0x494c;return db[_0x59d2e7('0x1')]['findOne']({'where':_0x24f37c[_0x59d2e7('0x18')]?_0x24f37c[_0x59d2e7('0x18')][_0x59d2e7('0x7')]||null:null})[_0x59d2e7('0xb')](function(_0x4fb92b){const _0x28aed4=_0x59d2e7;if(_0x4fb92b)return _0x4fb92b['addTags'](_0x24f37c[_0x28aed4('0xc')][_0x28aed4('0x16')],{'through':_[_0x28aed4('0x3')](_0x24f37c[_0x28aed4('0xc')],[_0x28aed4('0x16'),'id'])});})[_0x59d2e7('0xb')](function([_0x1b86a1]){const _0x4d2a49=_0x59d2e7;logger[_0x4d2a49('0x17')](_0x4d2a49('0x6'),_0x24f37c),logger[_0x4d2a49('0x9')](_0x4d2a49('0x6'),_0x24f37c,JSON[_0x4d2a49('0x10')](_0x1b86a1)),_0x22d192(_0x1b86a1);})[_0x59d2e7('0xa')](function(_0x2d125b){const _0x528b40=_0x59d2e7;logger[_0x528b40('0x5')](_0x528b40('0x6'),_0x2d125b[_0x528b40('0xe')],_0x24f37c),_0x11d84a(_0x56159b[_0x528b40('0x5')](0x1f4,_0x2d125b[_0x528b40('0xe')]));});});};
\ No newline at end of file