Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / voiceCallReport / voiceCallReport.controller.js
index b30e90d..57985e1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0dd4=['find','describe','uniqueid','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','count','offset','limit','set','apply','reject','update','then','error','stack','name','send','index','map','VoiceCallReport','rawAttributes','fieldName','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','pick','filter','where','merge','type','VIRTUAL','options','includeAll','fullname','alias','User','findAll','rows','catch','show','params','body','destroy'];(function(_0x4a8390,_0x5d8b31){var _0x22a5b7=function(_0x378964){while(--_0x378964){_0x4a8390['push'](_0x4a8390['shift']());}};_0x22a5b7(++_0x5d8b31);}(_0x0dd4,0x9d));var _0x40dd=function(_0x33c00e,_0x433579){_0x33c00e=_0x33c00e-0x0;var _0x1f2868=_0x0dd4[_0x33c00e];return _0x1f2868;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x40dd('0x0'));var rimraf=require(_0x40dd('0x1'));var zipdir=require(_0x40dd('0x2'));var jsonpatch=require(_0x40dd('0x3'));var rp=require(_0x40dd('0x4'));var moment=require(_0x40dd('0x5'));var BPromise=require(_0x40dd('0x6'));var Mustache=require(_0x40dd('0x7'));var util=require(_0x40dd('0x8'));var path=require('path');var sox=require('sox');var csv=require(_0x40dd('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x40dd('0xa'));var squel=require(_0x40dd('0xb'));var crypto=require(_0x40dd('0xc'));var jsforce=require(_0x40dd('0xd'));var deskjs=require(_0x40dd('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x40dd('0xf'));var Redis=require(_0x40dd('0x10'));var authService=require(_0x40dd('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x40dd('0x12'));var hardwareService=require(_0x40dd('0x13'));var logger=require(_0x40dd('0x14'))(_0x40dd('0x15'));var utils=require(_0x40dd('0x16'));var config=require(_0x40dd('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x7daf28,_0x1aa942){_0x1aa942=_0x1aa942||0xcc;return function(_0x58ae19){if(_0x58ae19){return _0x7daf28[_0x40dd('0x18')](_0x1aa942);}return _0x7daf28[_0x40dd('0x19')](_0x1aa942)[_0x40dd('0x1a')]();};}function respondWithResult(_0x2c7c8f,_0x13e4f7){_0x13e4f7=_0x13e4f7||0xc8;return function(_0x1bb1de){if(_0x1bb1de){return _0x2c7c8f['status'](_0x13e4f7)[_0x40dd('0x1b')](_0x1bb1de);}};}function respondWithFilteredResult(_0x28615e,_0x15c021){return function(_0x3dce43){if(_0x3dce43){var _0x189308=_0x3dce43[_0x40dd('0x1c')],_0x77c860=_0x15c021[_0x40dd('0x1d')],_0x339e51=_0x15c021[_0x40dd('0x1d')]+_0x15c021[_0x40dd('0x1e')],_0x154f2d;if(_0x339e51>=_0x189308){_0x339e51=_0x189308;_0x154f2d=0xc8;}else{_0x154f2d=0xce;}_0x28615e[_0x40dd('0x19')](_0x154f2d);return _0x28615e[_0x40dd('0x1f')]('Content-Range',_0x77c860+'-'+_0x339e51+'/'+_0x189308)[_0x40dd('0x1b')](_0x3dce43);}return null;};}function patchUpdates(_0x22829f){return function(_0x3e7c58){try{jsonpatch[_0x40dd('0x20')](_0x3e7c58,_0x22829f,!![]);}catch(_0x1bf993){return BPromise[_0x40dd('0x21')](_0x1bf993);}return _0x3e7c58['save']();};}function saveUpdates(_0xc292b,_0x332ffc){return function(_0x3ba452){if(_0x3ba452){return _0x3ba452[_0x40dd('0x22')](_0xc292b)[_0x40dd('0x23')](function(_0x46eaa1){return _0x46eaa1;});}return null;};}function removeEntity(_0x4b11c7,_0x26c65e){return function(_0xab21f3){if(_0xab21f3){return _0xab21f3['destroy']()[_0x40dd('0x23')](function(){_0x4b11c7[_0x40dd('0x19')](0xcc)[_0x40dd('0x1a')]();});}};}function handleEntityNotFound(_0x528cfb,_0x1c23f4){return function(_0x1b7a08){if(!_0x1b7a08){_0x528cfb[_0x40dd('0x18')](0x194);}return _0x1b7a08;};}function handleError(_0xe7cdcf,_0x541d21){_0x541d21=_0x541d21||0x1f4;return function(_0x4990d9){logger[_0x40dd('0x24')](_0x4990d9[_0x40dd('0x25')]);if(_0x4990d9[_0x40dd('0x26')]){delete _0x4990d9[_0x40dd('0x26')];}_0xe7cdcf['status'](_0x541d21)[_0x40dd('0x27')](_0x4990d9);};}exports[_0x40dd('0x28')]=function(_0x53617c,_0x24c359){var _0x3b1d86={},_0xc90826={},_0x4e19c6={'count':0x0,'rows':[]};var _0x361615=_[_0x40dd('0x29')](db[_0x40dd('0x2a')][_0x40dd('0x2b')],function(_0x57afba){return{'name':_0x57afba[_0x40dd('0x2c')],'type':_0x57afba['type']['key']};});_0xc90826[_0x40dd('0x2d')]=_['map'](_0x361615,_0x40dd('0x26'));_0xc90826[_0x40dd('0x2e')]=_[_0x40dd('0x2f')](_0x53617c['query']);_0xc90826[_0x40dd('0x30')]=_[_0x40dd('0x31')](_0xc90826[_0x40dd('0x2d')],_0xc90826[_0x40dd('0x2e')]);_0x3b1d86['attributes']=_[_0x40dd('0x31')](_0xc90826[_0x40dd('0x2d')],qs[_0x40dd('0x32')](_0x53617c['query'][_0x40dd('0x32')]));_0x3b1d86[_0x40dd('0x33')]=_0x3b1d86[_0x40dd('0x33')][_0x40dd('0x34')]?_0x3b1d86[_0x40dd('0x33')]:_0xc90826['model'];if(!_0x53617c[_0x40dd('0x2e')][_0x40dd('0x35')](_0x40dd('0x36'))){_0x3b1d86[_0x40dd('0x1e')]=qs[_0x40dd('0x1e')](_0x53617c[_0x40dd('0x2e')][_0x40dd('0x1e')]);_0x3b1d86[_0x40dd('0x1d')]=qs[_0x40dd('0x1d')](_0x53617c['query']['offset']);}_0x3b1d86['order']=qs[_0x40dd('0x37')](_0x53617c[_0x40dd('0x2e')]['sort']);_0x3b1d86['where']=qs[_0x40dd('0x30')](_[_0x40dd('0x38')](_0x53617c['query'],_0xc90826['filters']));if(_0x53617c[_0x40dd('0x2e')][_0x40dd('0x39')]){_0x3b1d86[_0x40dd('0x3a')]=_[_0x40dd('0x3b')](_0x3b1d86[_0x40dd('0x3a')],{'$or':_[_0x40dd('0x29')](_0x361615,function(_0x777d89){if(_0x777d89[_0x40dd('0x3c')]!==_0x40dd('0x3d')){var _0x51090={};_0x51090[_0x777d89[_0x40dd('0x26')]]={'$like':'%'+_0x53617c[_0x40dd('0x2e')][_0x40dd('0x39')]+'%'};return _0x51090;}})});}_0x3b1d86=_[_0x40dd('0x3b')]({},_0x3b1d86,_0x53617c[_0x40dd('0x3e')]);var _0x154ed6={'where':_0x3b1d86['where']};return db[_0x40dd('0x2a')]['count'](_0x154ed6)[_0x40dd('0x23')](function(_0x2a068d){_0x4e19c6[_0x40dd('0x1c')]=_0x2a068d;if(_0x53617c['query'][_0x40dd('0x3f')]){_0x3b1d86['include']=[{'attributes':['id',_0x40dd('0x26'),_0x40dd('0x40'),_0x40dd('0x41')],'model':db[_0x40dd('0x42')],'as':'User'}];}return db[_0x40dd('0x2a')][_0x40dd('0x43')](_0x3b1d86);})['then'](function(_0x2fea55){_0x4e19c6[_0x40dd('0x44')]=_0x2fea55;return _0x4e19c6;})['then'](respondWithFilteredResult(_0x24c359,_0x3b1d86))[_0x40dd('0x45')](handleError(_0x24c359,null));};exports[_0x40dd('0x46')]=function(_0x502b0a,_0x369278){var _0x496158={'raw':!![],'where':{'id':_0x502b0a[_0x40dd('0x47')]['id']}},_0x1cd0c4={};_0x1cd0c4[_0x40dd('0x2d')]=_['keys'](db['VoiceCallReport'][_0x40dd('0x2b')]);_0x1cd0c4[_0x40dd('0x2e')]=_['keys'](_0x502b0a[_0x40dd('0x2e')]);_0x1cd0c4['filters']=_[_0x40dd('0x31')](_0x1cd0c4['model'],_0x1cd0c4[_0x40dd('0x2e')]);_0x496158[_0x40dd('0x33')]=_['intersection'](_0x1cd0c4[_0x40dd('0x2d')],qs['fields'](_0x502b0a['query']['fields']));_0x496158[_0x40dd('0x33')]=_0x496158[_0x40dd('0x33')][_0x40dd('0x34')]?_0x496158[_0x40dd('0x33')]:_0x1cd0c4[_0x40dd('0x2d')];if(_0x502b0a[_0x40dd('0x2e')][_0x40dd('0x3f')]){_0x496158['include']=[{'all':!![]}];}_0x496158=_[_0x40dd('0x3b')]({},_0x496158,_0x502b0a[_0x40dd('0x3e')]);return db[_0x40dd('0x2a')]['find'](_0x496158)[_0x40dd('0x23')](handleEntityNotFound(_0x369278,null))['then'](respondWithResult(_0x369278,null))[_0x40dd('0x45')](handleError(_0x369278,null));};exports['create']=function(_0x425a38,_0x5acb27){return db[_0x40dd('0x2a')]['create'](_0x425a38[_0x40dd('0x48')],{})[_0x40dd('0x23')](respondWithResult(_0x5acb27,0xc9))[_0x40dd('0x45')](handleError(_0x5acb27,null));};exports[_0x40dd('0x49')]=function(_0xf93a2b,_0x299ca1){return db[_0x40dd('0x2a')][_0x40dd('0x4a')]({'where':{'id':_0xf93a2b[_0x40dd('0x47')]['id']}})[_0x40dd('0x23')](handleEntityNotFound(_0x299ca1,null))['then'](removeEntity(_0x299ca1,null))[_0x40dd('0x45')](handleError(_0x299ca1,null));};exports[_0x40dd('0x4b')]=function(_0x1d5cd2,_0x94d21f){return db[_0x40dd('0x2a')][_0x40dd('0x4b')]()['then'](respondWithResult(_0x94d21f,null))[_0x40dd('0x45')](handleError(_0x94d21f,null));};exports['update']=function(_0x15478b,_0x51a36a){if(_0x15478b[_0x40dd('0x48')][_0x40dd('0x4c')]){delete _0x15478b[_0x40dd('0x48')]['uniqueid'];}return db[_0x40dd('0x2a')][_0x40dd('0x4a')]({'where':{'uniqueid':_0x15478b[_0x40dd('0x47')]['id'],'UserId':{'$or':[null,_0x15478b['user']['id']]}}})[_0x40dd('0x23')](handleEntityNotFound(_0x51a36a,null))[_0x40dd('0x23')](saveUpdates(_0x15478b[_0x40dd('0x48')],null))[_0x40dd('0x23')](respondWithResult(_0x51a36a,null))['catch'](handleError(_0x51a36a,null));};
\ No newline at end of file
+var _0x2ef3=['pick','filter','merge','options','VoiceCallReport','then','includeAll','include','fullname','alias','User','findAll','rows','catch','show','params','keys','find','create','destroy','describe','body','uniqueid','user','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','error','stack','name','send','map','rawAttributes','fieldName','type','key','model','query','filters','attributes','intersection','fields','length','hasOwnProperty','order','sort','where'];(function(_0x67f95e,_0x3ca797){var _0x538f5a=function(_0xc919e9){while(--_0xc919e9){_0x67f95e['push'](_0x67f95e['shift']());}};_0x538f5a(++_0x3ca797);}(_0x2ef3,0xba));var _0x32ef=function(_0x2b8241,_0x471900){_0x2b8241=_0x2b8241-0x0;var _0x4185fa=_0x2ef3[_0x2b8241];return _0x4185fa;};'use strict';var emlformat=require(_0x32ef('0x0'));var rimraf=require(_0x32ef('0x1'));var zipdir=require(_0x32ef('0x2'));var jsonpatch=require(_0x32ef('0x3'));var rp=require(_0x32ef('0x4'));var moment=require(_0x32ef('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x32ef('0x6'));var util=require(_0x32ef('0x7'));var path=require('path');var sox=require(_0x32ef('0x8'));var csv=require(_0x32ef('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x32ef('0xa'));var squel=require(_0x32ef('0xb'));var crypto=require(_0x32ef('0xc'));var jsforce=require(_0x32ef('0xd'));var deskjs=require(_0x32ef('0xe'));var toCsv=require(_0x32ef('0x9'));var querystring=require(_0x32ef('0xf'));var Papa=require(_0x32ef('0x10'));var Redis=require(_0x32ef('0x11'));var authService=require(_0x32ef('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x32ef('0x13'));var logger=require(_0x32ef('0x14'))(_0x32ef('0x15'));var utils=require(_0x32ef('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x32ef('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1a5106,_0x49d590){_0x49d590=_0x49d590||0xcc;return function(_0x3e98df){if(_0x3e98df){return _0x1a5106[_0x32ef('0x18')](_0x49d590);}return _0x1a5106['status'](_0x49d590)['end']();};}function respondWithResult(_0x19ce1,_0x4d8009){_0x4d8009=_0x4d8009||0xc8;return function(_0x326fce){if(_0x326fce){return _0x19ce1[_0x32ef('0x19')](_0x4d8009)[_0x32ef('0x1a')](_0x326fce);}};}function respondWithFilteredResult(_0x54c7f5,_0x57aff1){return function(_0x55bf0b){if(_0x55bf0b){var _0x531e30=typeof _0x57aff1[_0x32ef('0x1b')]===_0x32ef('0x1c')&&typeof _0x57aff1[_0x32ef('0x1d')]==='undefined';var _0x5d559b=_0x55bf0b[_0x32ef('0x1e')];var _0x1a9476=_0x531e30?0x0:_0x57aff1[_0x32ef('0x1b')];var _0x57863c=_0x531e30?_0x55bf0b[_0x32ef('0x1e')]:_0x57aff1[_0x32ef('0x1b')]+_0x57aff1['limit'];var _0x304505;if(_0x57863c>=_0x5d559b){_0x57863c=_0x5d559b;_0x304505=0xc8;}else{_0x304505=0xce;}_0x54c7f5[_0x32ef('0x19')](_0x304505);return _0x54c7f5[_0x32ef('0x1f')](_0x32ef('0x20'),_0x1a9476+'-'+_0x57863c+'/'+_0x5d559b)[_0x32ef('0x1a')](_0x55bf0b);}return null;};}function patchUpdates(_0x3aec05){return function(_0x4de441){try{jsonpatch[_0x32ef('0x21')](_0x4de441,_0x3aec05,!![]);}catch(_0x5cc3ef){return BPromise[_0x32ef('0x22')](_0x5cc3ef);}return _0x4de441[_0x32ef('0x23')]();};}function saveUpdates(_0x49f2d8,_0x1af371){return function(_0x97780){if(_0x97780){return _0x97780[_0x32ef('0x24')](_0x49f2d8)['then'](function(_0x57f5e5){return _0x57f5e5;});}return null;};}function removeEntity(_0x22f2d7,_0xb30fab){return function(_0x225feb){if(_0x225feb){return _0x225feb['destroy']()['then'](function(){_0x22f2d7[_0x32ef('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x51a412,_0x278495){return function(_0x14d4b3){if(!_0x14d4b3){_0x51a412[_0x32ef('0x18')](0x194);}return _0x14d4b3;};}function handleError(_0x1dbe98,_0x15ce54){_0x15ce54=_0x15ce54||0x1f4;return function(_0x234175){logger[_0x32ef('0x25')](_0x234175[_0x32ef('0x26')]);if(_0x234175[_0x32ef('0x27')]){delete _0x234175[_0x32ef('0x27')];}_0x1dbe98[_0x32ef('0x19')](_0x15ce54)[_0x32ef('0x28')](_0x234175);};}exports['index']=function(_0xd65fde,_0x2f5d06){var _0x5a04cd={},_0x12de1a={},_0x3c569d={'count':0x0,'rows':[]};var _0x30b250=_[_0x32ef('0x29')](db['VoiceCallReport'][_0x32ef('0x2a')],function(_0x22bf86){return{'name':_0x22bf86[_0x32ef('0x2b')],'type':_0x22bf86[_0x32ef('0x2c')][_0x32ef('0x2d')]};});_0x12de1a[_0x32ef('0x2e')]=_[_0x32ef('0x29')](_0x30b250,'name');_0x12de1a[_0x32ef('0x2f')]=_['keys'](_0xd65fde[_0x32ef('0x2f')]);_0x12de1a[_0x32ef('0x30')]=_['intersection'](_0x12de1a[_0x32ef('0x2e')],_0x12de1a[_0x32ef('0x2f')]);_0x5a04cd[_0x32ef('0x31')]=_[_0x32ef('0x32')](_0x12de1a[_0x32ef('0x2e')],qs['fields'](_0xd65fde['query'][_0x32ef('0x33')]));_0x5a04cd['attributes']=_0x5a04cd[_0x32ef('0x31')][_0x32ef('0x34')]?_0x5a04cd[_0x32ef('0x31')]:_0x12de1a[_0x32ef('0x2e')];if(!_0xd65fde[_0x32ef('0x2f')][_0x32ef('0x35')]('nolimit')){_0x5a04cd['limit']=qs['limit'](_0xd65fde[_0x32ef('0x2f')][_0x32ef('0x1d')]);_0x5a04cd[_0x32ef('0x1b')]=qs['offset'](_0xd65fde['query'][_0x32ef('0x1b')]);}_0x5a04cd[_0x32ef('0x36')]=qs[_0x32ef('0x37')](_0xd65fde['query']['sort']);_0x5a04cd[_0x32ef('0x38')]=qs[_0x32ef('0x30')](_[_0x32ef('0x39')](_0xd65fde[_0x32ef('0x2f')],_0x12de1a[_0x32ef('0x30')]),_0x30b250);if(_0xd65fde[_0x32ef('0x2f')][_0x32ef('0x3a')]){_0x5a04cd[_0x32ef('0x38')]=_[_0x32ef('0x3b')](_0x5a04cd['where'],{'$or':_[_0x32ef('0x29')](_0x30b250,function(_0x36e374){if(_0x36e374[_0x32ef('0x2c')]!=='VIRTUAL'){var _0x365125={};_0x365125[_0x36e374[_0x32ef('0x27')]]={'$like':'%'+_0xd65fde[_0x32ef('0x2f')][_0x32ef('0x3a')]+'%'};return _0x365125;}})});}_0x5a04cd=_[_0x32ef('0x3b')]({},_0x5a04cd,_0xd65fde[_0x32ef('0x3c')]);var _0x256c40={'where':_0x5a04cd[_0x32ef('0x38')]};return db[_0x32ef('0x3d')][_0x32ef('0x1e')](_0x256c40)[_0x32ef('0x3e')](function(_0x4615b4){_0x3c569d['count']=_0x4615b4;if(_0xd65fde[_0x32ef('0x2f')][_0x32ef('0x3f')]){_0x5a04cd[_0x32ef('0x40')]=[{'attributes':['id',_0x32ef('0x27'),_0x32ef('0x41'),_0x32ef('0x42')],'model':db[_0x32ef('0x43')],'as':'User'}];}return db['VoiceCallReport'][_0x32ef('0x44')](_0x5a04cd);})[_0x32ef('0x3e')](function(_0x2a33dd){_0x3c569d[_0x32ef('0x45')]=_0x2a33dd;return _0x3c569d;})['then'](respondWithFilteredResult(_0x2f5d06,_0x5a04cd))[_0x32ef('0x46')](handleError(_0x2f5d06,null));};exports[_0x32ef('0x47')]=function(_0x5d2f06,_0x4744ba){var _0x4bc5bc={'raw':!![],'where':{'id':_0x5d2f06[_0x32ef('0x48')]['id']}},_0xcb3c08={};_0xcb3c08[_0x32ef('0x2e')]=_[_0x32ef('0x49')](db[_0x32ef('0x3d')][_0x32ef('0x2a')]);_0xcb3c08[_0x32ef('0x2f')]=_[_0x32ef('0x49')](_0x5d2f06[_0x32ef('0x2f')]);_0xcb3c08[_0x32ef('0x30')]=_['intersection'](_0xcb3c08[_0x32ef('0x2e')],_0xcb3c08['query']);_0x4bc5bc[_0x32ef('0x31')]=_[_0x32ef('0x32')](_0xcb3c08[_0x32ef('0x2e')],qs['fields'](_0x5d2f06[_0x32ef('0x2f')][_0x32ef('0x33')]));_0x4bc5bc[_0x32ef('0x31')]=_0x4bc5bc[_0x32ef('0x31')][_0x32ef('0x34')]?_0x4bc5bc[_0x32ef('0x31')]:_0xcb3c08[_0x32ef('0x2e')];if(_0x5d2f06['query']['includeAll']){_0x4bc5bc[_0x32ef('0x40')]=[{'all':!![]}];}_0x4bc5bc=_[_0x32ef('0x3b')]({},_0x4bc5bc,_0x5d2f06[_0x32ef('0x3c')]);return db[_0x32ef('0x3d')][_0x32ef('0x4a')](_0x4bc5bc)[_0x32ef('0x3e')](handleEntityNotFound(_0x4744ba,null))[_0x32ef('0x3e')](respondWithResult(_0x4744ba,null))[_0x32ef('0x46')](handleError(_0x4744ba,null));};exports[_0x32ef('0x4b')]=function(_0x1ebedf,_0x35a294){return db[_0x32ef('0x3d')][_0x32ef('0x4b')](_0x1ebedf['body'],{})[_0x32ef('0x3e')](respondWithResult(_0x35a294,0xc9))[_0x32ef('0x46')](handleError(_0x35a294,null));};exports[_0x32ef('0x4c')]=function(_0xd42609,_0x1cc9f3){return db[_0x32ef('0x3d')][_0x32ef('0x4a')]({'where':{'id':_0xd42609[_0x32ef('0x48')]['id']}})[_0x32ef('0x3e')](handleEntityNotFound(_0x1cc9f3,null))[_0x32ef('0x3e')](removeEntity(_0x1cc9f3,null))[_0x32ef('0x46')](handleError(_0x1cc9f3,null));};exports[_0x32ef('0x4d')]=function(_0x272377,_0x326445){return db[_0x32ef('0x3d')][_0x32ef('0x4d')]()[_0x32ef('0x3e')](respondWithResult(_0x326445,null))[_0x32ef('0x46')](handleError(_0x326445,null));};exports['update']=function(_0x515ac9,_0x179c2f){if(_0x515ac9[_0x32ef('0x4e')][_0x32ef('0x4f')]){delete _0x515ac9[_0x32ef('0x4e')][_0x32ef('0x4f')];}return db[_0x32ef('0x3d')][_0x32ef('0x4a')]({'where':{'uniqueid':_0x515ac9[_0x32ef('0x48')]['id'],'UserId':{'$or':[null,_0x515ac9[_0x32ef('0x50')]['id']]}}})[_0x32ef('0x3e')](handleEntityNotFound(_0x179c2f,null))[_0x32ef('0x3e')](saveUpdates(_0x515ac9['body'],null))[_0x32ef('0x3e')](respondWithResult(_0x179c2f,null))[_0x32ef('0x46')](handleError(_0x179c2f,null));};
\ No newline at end of file