Built motion from commit 8dca541896b0ff92bb88a36cc13f4f385b593b4b. Version 3.0.0...
[motion-next.git] / server / api / faxInteraction / faxInteraction.rpc.js
1 const a201_0x2fdf=['ids','body','FaxInteraction','message','update','debug','catch','AddTagsToFaxInteraction','error','./faxInteraction.socket','options','UpdateFaxInteraction','rpc','AddTags','where','stringify','then','lodash','addTags','attributes','omit','../../rediscache','info'];(function(_0x6f7ed9,_0x2fdf6f){const _0x129960=function(_0x7b0429){while(--_0x7b0429){_0x6f7ed9['push'](_0x6f7ed9['shift']());}};_0x129960(++_0x2fdf6f);}(a201_0x2fdf,0x1b9));const a201_0x1299=function(_0x6f7ed9,_0x2fdf6f){_0x6f7ed9=_0x6f7ed9-0x0;let _0x129960=a201_0x2fdf[_0x6f7ed9];return _0x129960;};const _0x28f8b2=a201_0x1299;'use strict';const _=require(_0x28f8b2('0xd')),db=require('../../mysqldb')['db'],logger=require('../../config/logger')(_0x28f8b2('0x8')),{getSocket}=require(_0x28f8b2('0x11')),socket=getSocket();require(_0x28f8b2('0x5'))['register'](socket),exports['UpdateFaxInteraction']=function(_0x7b0429){const _0x1ae8a4=this;return new Promise(function(_0x12a42b,_0xa8862f){const _0x194481=a201_0x1299;return db[_0x194481('0x15')][_0x194481('0x0')](_0x7b0429[_0x194481('0x14')],{'raw':_0x7b0429[_0x194481('0x6')]?_0x7b0429[_0x194481('0x6')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x7b0429['options']?_0x7b0429[_0x194481('0x6')][_0x194481('0xa')]||null:null,'attributes':_0x7b0429[_0x194481('0x6')]?_0x7b0429['options'][_0x194481('0xf')]||null:null,'limit':_0x7b0429[_0x194481('0x6')]?_0x7b0429[_0x194481('0x6')]['limit']||null:null})[_0x194481('0xc')](function(_0x2b7ae7){const _0x37e414=_0x194481;logger[_0x37e414('0x12')](_0x37e414('0x7'),_0x7b0429),logger['debug']('UpdateFaxInteraction',_0x7b0429,JSON[_0x37e414('0xb')](_0x2b7ae7)),_0x12a42b(_0x2b7ae7);})[_0x194481('0x2')](function(_0x22a809){const _0x37c1d2=_0x194481;logger['error'](_0x37c1d2('0x7'),_0x22a809[_0x37c1d2('0x16')],_0x7b0429),_0xa8862f(_0x1ae8a4[_0x37c1d2('0x4')](0x1f4,_0x22a809[_0x37c1d2('0x16')]));});});},exports[_0x28f8b2('0x3')]=function(_0x39a819){const _0x288800=this;return new Promise(function(_0x40f6b3,_0x5a63da){const _0x2a63ed=a201_0x1299;return db[_0x2a63ed('0x15')]['findOne']({'where':_0x39a819[_0x2a63ed('0x6')]?_0x39a819[_0x2a63ed('0x6')][_0x2a63ed('0xa')]||null:null})[_0x2a63ed('0xc')](function(_0x40d5c1){const _0x3f42ad=_0x2a63ed;if(_0x40d5c1)return _0x40d5c1[_0x3f42ad('0xe')](_0x39a819[_0x3f42ad('0x14')][_0x3f42ad('0x13')],{'through':_[_0x3f42ad('0x10')](_0x39a819[_0x3f42ad('0x14')],[_0x3f42ad('0x13'),'id'])});})[_0x2a63ed('0xc')](function([_0x46b641]){const _0x3e633b=_0x2a63ed;logger[_0x3e633b('0x12')](_0x3e633b('0x9'),_0x39a819),logger[_0x3e633b('0x1')](_0x3e633b('0x9'),_0x39a819,JSON[_0x3e633b('0xb')](_0x46b641)),_0x40f6b3(_0x46b641);})['catch'](function(_0xed7a74){const _0x1c84d7=_0x2a63ed;logger[_0x1c84d7('0x4')](_0x1c84d7('0x9'),_0xed7a74[_0x1c84d7('0x16')],_0x39a819),_0x5a63da(_0x288800[_0x1c84d7('0x4')](0x1f4,_0xed7a74[_0x1c84d7('0x16')]));});});};