Built motion from commit 497d3d92.|2.5.43
[motion2.git] / server / api / voiceCallReport / voiceCallReport.controller.js
index ab107f1..221a9c1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf91a=['../../config/utils','status','end','json','offset','limit','set','Content-Range','apply','reject','save','update','then','sendStatus','error','stack','name','index','map','VoiceCallReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','VIRTUAL','merge','options','count','include','User','findAll','rows','catch','show','params','includeAll','find','create','body','describe','uniqueid','user','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api'];(function(_0x51046e,_0x6ab4f4){var _0x2f9248=function(_0xab6e3e){while(--_0xab6e3e){_0x51046e['push'](_0x51046e['shift']());}};_0x2f9248(++_0x6ab4f4);}(_0xf91a,0x1ce));var _0xaf91=function(_0x38b105,_0x96ee){_0x38b105=_0x38b105-0x0;var _0x136d57=_0xf91a[_0x38b105];return _0x136d57;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0xaf91('0x0'));var zipdir=require(_0xaf91('0x1'));var jsonpatch=require(_0xaf91('0x2'));var rp=require(_0xaf91('0x3'));var moment=require(_0xaf91('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xaf91('0x5'));var util=require(_0xaf91('0x6'));var path=require(_0xaf91('0x7'));var sox=require('sox');var csv=require(_0xaf91('0x8'));var ejs=require(_0xaf91('0x9'));var fs=require('fs');var _=require(_0xaf91('0xa'));var squel=require(_0xaf91('0xb'));var crypto=require(_0xaf91('0xc'));var jsforce=require(_0xaf91('0xd'));var deskjs=require(_0xaf91('0xe'));var toCsv=require(_0xaf91('0x8'));var querystring=require(_0xaf91('0xf'));var Papa=require(_0xaf91('0x10'));var Redis=require(_0xaf91('0x11'));var authService=require(_0xaf91('0x12'));var qs=require(_0xaf91('0x13'));var as=require(_0xaf91('0x14'));var hardwareService=require(_0xaf91('0x15'));var logger=require(_0xaf91('0x16'))(_0xaf91('0x17'));var utils=require(_0xaf91('0x18'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3f8073,_0x48c7be){_0x48c7be=_0x48c7be||0xcc;return function(_0x58af57){if(_0x58af57){return _0x3f8073['sendStatus'](_0x48c7be);}return _0x3f8073[_0xaf91('0x19')](_0x48c7be)[_0xaf91('0x1a')]();};}function respondWithResult(_0x3738aa,_0x3ed494){_0x3ed494=_0x3ed494||0xc8;return function(_0x16e19d){if(_0x16e19d){return _0x3738aa[_0xaf91('0x19')](_0x3ed494)[_0xaf91('0x1b')](_0x16e19d);}};}function respondWithFilteredResult(_0x189f9c,_0x1ea196){return function(_0x5c73e0){if(_0x5c73e0){var _0x5b21df=_0x5c73e0['count'],_0x13a2bd=_0x1ea196['offset'],_0x19e50d=_0x1ea196[_0xaf91('0x1c')]+_0x1ea196[_0xaf91('0x1d')],_0xa877a2;if(_0x19e50d>=_0x5b21df){_0x19e50d=_0x5b21df;_0xa877a2=0xc8;}else{_0xa877a2=0xce;}_0x189f9c['status'](_0xa877a2);return _0x189f9c[_0xaf91('0x1e')](_0xaf91('0x1f'),_0x13a2bd+'-'+_0x19e50d+'/'+_0x5b21df)[_0xaf91('0x1b')](_0x5c73e0);}return null;};}function patchUpdates(_0x14196d){return function(_0x1544eb){try{jsonpatch[_0xaf91('0x20')](_0x1544eb,_0x14196d,!![]);}catch(_0x27d670){return BPromise[_0xaf91('0x21')](_0x27d670);}return _0x1544eb[_0xaf91('0x22')]();};}function saveUpdates(_0x3d1cac,_0x1095de){return function(_0x59407d){if(_0x59407d){return _0x59407d[_0xaf91('0x23')](_0x3d1cac)[_0xaf91('0x24')](function(_0x4be9f5){return _0x4be9f5;});}return null;};}function removeEntity(_0x34500d,_0x1978f1){return function(_0x3aebf7){if(_0x3aebf7){return _0x3aebf7['destroy']()[_0xaf91('0x24')](function(){_0x34500d['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x1dc65a,_0x4177d2){return function(_0x128f5b){if(!_0x128f5b){_0x1dc65a[_0xaf91('0x25')](0x194);}return _0x128f5b;};}function handleError(_0x172e73,_0x4add37){_0x4add37=_0x4add37||0x1f4;return function(_0x3a5bc5){logger[_0xaf91('0x26')](_0x3a5bc5[_0xaf91('0x27')]);if(_0x3a5bc5[_0xaf91('0x28')]){delete _0x3a5bc5[_0xaf91('0x28')];}_0x172e73['status'](_0x4add37)['send'](_0x3a5bc5);};}exports[_0xaf91('0x29')]=function(_0x2481b0,_0x1cbc06){var _0x101d94={},_0x5c7548={},_0x293535={'count':0x0,'rows':[]};var _0x3de82e=_[_0xaf91('0x2a')](db[_0xaf91('0x2b')][_0xaf91('0x2c')],function(_0x5880f0){return{'name':_0x5880f0[_0xaf91('0x2d')],'type':_0x5880f0[_0xaf91('0x2e')][_0xaf91('0x2f')]};});_0x5c7548[_0xaf91('0x30')]=_[_0xaf91('0x2a')](_0x3de82e,_0xaf91('0x28'));_0x5c7548[_0xaf91('0x31')]=_[_0xaf91('0x32')](_0x2481b0['query']);_0x5c7548[_0xaf91('0x33')]=_[_0xaf91('0x34')](_0x5c7548[_0xaf91('0x30')],_0x5c7548[_0xaf91('0x31')]);_0x101d94[_0xaf91('0x35')]=_[_0xaf91('0x34')](_0x5c7548[_0xaf91('0x30')],qs[_0xaf91('0x36')](_0x2481b0[_0xaf91('0x31')][_0xaf91('0x36')]));_0x101d94['attributes']=_0x101d94[_0xaf91('0x35')][_0xaf91('0x37')]?_0x101d94[_0xaf91('0x35')]:_0x5c7548[_0xaf91('0x30')];if(!_0x2481b0[_0xaf91('0x31')][_0xaf91('0x38')](_0xaf91('0x39'))){_0x101d94[_0xaf91('0x1d')]=qs[_0xaf91('0x1d')](_0x2481b0['query'][_0xaf91('0x1d')]);_0x101d94['offset']=qs[_0xaf91('0x1c')](_0x2481b0['query']['offset']);}_0x101d94[_0xaf91('0x3a')]=qs[_0xaf91('0x3b')](_0x2481b0[_0xaf91('0x31')]['sort']);_0x101d94['where']=qs['filters'](_[_0xaf91('0x3c')](_0x2481b0[_0xaf91('0x31')],_0x5c7548['filters']));if(_0x2481b0[_0xaf91('0x31')][_0xaf91('0x3d')]){_0x101d94[_0xaf91('0x3e')]=_['merge'](_0x101d94[_0xaf91('0x3e')],{'$or':_['map'](_0x3de82e,function(_0x293fa1){if(_0x293fa1[_0xaf91('0x2e')]!==_0xaf91('0x3f')){var _0x2f80a4={};_0x2f80a4[_0x293fa1[_0xaf91('0x28')]]={'$like':'%'+_0x2481b0[_0xaf91('0x31')][_0xaf91('0x3d')]+'%'};return _0x2f80a4;}})});}_0x101d94=_[_0xaf91('0x40')]({},_0x101d94,_0x2481b0[_0xaf91('0x41')]);var _0x40cf9a={'where':_0x101d94[_0xaf91('0x3e')]};return db['VoiceCallReport'][_0xaf91('0x42')](_0x40cf9a)[_0xaf91('0x24')](function(_0x1de0ec){_0x293535[_0xaf91('0x42')]=_0x1de0ec;if(_0x2481b0['query']['includeAll']){_0x101d94[_0xaf91('0x43')]=[{'attributes':['id',_0xaf91('0x28'),'fullname','alias'],'model':db[_0xaf91('0x44')],'as':_0xaf91('0x44')}];}return db[_0xaf91('0x2b')][_0xaf91('0x45')](_0x101d94);})['then'](function(_0x547fda){_0x293535[_0xaf91('0x46')]=_0x547fda;return _0x293535;})[_0xaf91('0x24')](respondWithFilteredResult(_0x1cbc06,_0x101d94))[_0xaf91('0x47')](handleError(_0x1cbc06,null));};exports[_0xaf91('0x48')]=function(_0x479df0,_0x294ee5){var _0x5c733b={'raw':!![],'where':{'id':_0x479df0[_0xaf91('0x49')]['id']}},_0x1510f3={};_0x1510f3[_0xaf91('0x30')]=_['keys'](db[_0xaf91('0x2b')][_0xaf91('0x2c')]);_0x1510f3[_0xaf91('0x31')]=_[_0xaf91('0x32')](_0x479df0[_0xaf91('0x31')]);_0x1510f3[_0xaf91('0x33')]=_[_0xaf91('0x34')](_0x1510f3['model'],_0x1510f3[_0xaf91('0x31')]);_0x5c733b[_0xaf91('0x35')]=_['intersection'](_0x1510f3[_0xaf91('0x30')],qs[_0xaf91('0x36')](_0x479df0['query']['fields']));_0x5c733b['attributes']=_0x5c733b[_0xaf91('0x35')][_0xaf91('0x37')]?_0x5c733b[_0xaf91('0x35')]:_0x1510f3[_0xaf91('0x30')];if(_0x479df0['query'][_0xaf91('0x4a')]){_0x5c733b[_0xaf91('0x43')]=[{'all':!![]}];}_0x5c733b=_[_0xaf91('0x40')]({},_0x5c733b,_0x479df0[_0xaf91('0x41')]);return db['VoiceCallReport'][_0xaf91('0x4b')](_0x5c733b)[_0xaf91('0x24')](handleEntityNotFound(_0x294ee5,null))[_0xaf91('0x24')](respondWithResult(_0x294ee5,null))[_0xaf91('0x47')](handleError(_0x294ee5,null));};exports[_0xaf91('0x4c')]=function(_0x45f86a,_0x21fe61){return db['VoiceCallReport'][_0xaf91('0x4c')](_0x45f86a[_0xaf91('0x4d')],{})['then'](respondWithResult(_0x21fe61,0xc9))[_0xaf91('0x47')](handleError(_0x21fe61,null));};exports['destroy']=function(_0x171415,_0x320c88){return db[_0xaf91('0x2b')]['find']({'where':{'id':_0x171415[_0xaf91('0x49')]['id']}})['then'](handleEntityNotFound(_0x320c88,null))[_0xaf91('0x24')](removeEntity(_0x320c88,null))[_0xaf91('0x47')](handleError(_0x320c88,null));};exports['describe']=function(_0x261ed8,_0x1b9148){return db[_0xaf91('0x2b')][_0xaf91('0x4e')]()[_0xaf91('0x24')](respondWithResult(_0x1b9148,null))[_0xaf91('0x47')](handleError(_0x1b9148,null));};exports[_0xaf91('0x23')]=function(_0x30070e,_0x23ef43){if(_0x30070e[_0xaf91('0x4d')][_0xaf91('0x4f')]){delete _0x30070e['body'][_0xaf91('0x4f')];}return db[_0xaf91('0x2b')][_0xaf91('0x4b')]({'where':{'uniqueid':_0x30070e[_0xaf91('0x49')]['id'],'UserId':{'$or':[null,_0x30070e[_0xaf91('0x50')]['id']]}}})[_0xaf91('0x24')](handleEntityNotFound(_0x23ef43,null))[_0xaf91('0x24')](saveUpdates(_0x30070e[_0xaf91('0x4d')],null))[_0xaf91('0x24')](respondWithResult(_0x23ef43,null))['catch'](handleError(_0x23ef43,null));};
\ No newline at end of file
+var _0xb10b=['desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','reject','update','then','destroy','end','error','stack','name','send','index','map','rawAttributes','fieldName','key','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filters','pick','VIRTUAL','filter','merge','options','VoiceCallReport','includeAll','include','alias','User','rows','show','find','create','body','catch','params','describe','uniqueid','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','crypto','jsforce'];(function(_0x4bd336,_0x31d665){var _0x3407db=function(_0x8653d7){while(--_0x8653d7){_0x4bd336['push'](_0x4bd336['shift']());}};_0x3407db(++_0x31d665);}(_0xb10b,0x12a));var _0xbb10=function(_0x2d460c,_0x4f08c0){_0x2d460c=_0x2d460c-0x0;var _0xf6fc4c=_0xb10b[_0x2d460c];return _0xf6fc4c;};'use strict';var emlformat=require(_0xbb10('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xbb10('0x1'));var jsonpatch=require(_0xbb10('0x2'));var rp=require(_0xbb10('0x3'));var moment=require('moment');var BPromise=require(_0xbb10('0x4'));var Mustache=require(_0xbb10('0x5'));var util=require(_0xbb10('0x6'));var path=require(_0xbb10('0x7'));var sox=require(_0xbb10('0x8'));var csv=require(_0xbb10('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xbb10('0xa'));var _=require(_0xbb10('0xb'));var squel=require('squel');var crypto=require(_0xbb10('0xc'));var jsforce=require(_0xbb10('0xd'));var deskjs=require(_0xbb10('0xe'));var toCsv=require(_0xbb10('0x9'));var querystring=require(_0xbb10('0xf'));var Papa=require(_0xbb10('0x10'));var Redis=require(_0xbb10('0x11'));var authService=require(_0xbb10('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xbb10('0x13'));var logger=require(_0xbb10('0x14'))(_0xbb10('0x15'));var utils=require('../../config/utils');var config=require(_0xbb10('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0xbb10('0x17'))['db'];function respondWithStatusCode(_0x916a32,_0x285009){_0x285009=_0x285009||0xcc;return function(_0x193a27){if(_0x193a27){return _0x916a32[_0xbb10('0x18')](_0x285009);}return _0x916a32[_0xbb10('0x19')](_0x285009)['end']();};}function respondWithResult(_0x26e021,_0x42d7e4){_0x42d7e4=_0x42d7e4||0xc8;return function(_0x45b9d6){if(_0x45b9d6){return _0x26e021[_0xbb10('0x19')](_0x42d7e4)[_0xbb10('0x1a')](_0x45b9d6);}};}function respondWithFilteredResult(_0x2f2ebf,_0x24a57b){return function(_0x36b5e8){if(_0x36b5e8){var _0x3e26f4=typeof _0x24a57b[_0xbb10('0x1b')]==='undefined'&&typeof _0x24a57b[_0xbb10('0x1c')]===_0xbb10('0x1d');var _0x133ac2=_0x36b5e8[_0xbb10('0x1e')];var _0x378da8=_0x3e26f4?0x0:_0x24a57b[_0xbb10('0x1b')];var _0x575cca=_0x3e26f4?_0x36b5e8[_0xbb10('0x1e')]:_0x24a57b[_0xbb10('0x1b')]+_0x24a57b[_0xbb10('0x1c')];var _0x48b6e9;if(_0x575cca>=_0x133ac2){_0x575cca=_0x133ac2;_0x48b6e9=0xc8;}else{_0x48b6e9=0xce;}_0x2f2ebf[_0xbb10('0x19')](_0x48b6e9);return _0x2f2ebf[_0xbb10('0x1f')](_0xbb10('0x20'),_0x378da8+'-'+_0x575cca+'/'+_0x133ac2)[_0xbb10('0x1a')](_0x36b5e8);}return null;};}function patchUpdates(_0xdf237d){return function(_0x44e563){try{jsonpatch['apply'](_0x44e563,_0xdf237d,!![]);}catch(_0x12f888){return BPromise[_0xbb10('0x21')](_0x12f888);}return _0x44e563['save']();};}function saveUpdates(_0x4c4b0d,_0x8e2b97){return function(_0x311abe){if(_0x311abe){return _0x311abe[_0xbb10('0x22')](_0x4c4b0d)[_0xbb10('0x23')](function(_0x445761){return _0x445761;});}return null;};}function removeEntity(_0x1824b7,_0x407cb4){return function(_0x436104){if(_0x436104){return _0x436104[_0xbb10('0x24')]()[_0xbb10('0x23')](function(){_0x1824b7[_0xbb10('0x19')](0xcc)[_0xbb10('0x25')]();});}};}function handleEntityNotFound(_0x537898,_0x4fedac){return function(_0x4fb5e0){if(!_0x4fb5e0){_0x537898[_0xbb10('0x18')](0x194);}return _0x4fb5e0;};}function handleError(_0x3c5ae7,_0x2c89b9){_0x2c89b9=_0x2c89b9||0x1f4;return function(_0x4e25ff){logger[_0xbb10('0x26')](_0x4e25ff[_0xbb10('0x27')]);if(_0x4e25ff[_0xbb10('0x28')]){delete _0x4e25ff[_0xbb10('0x28')];}_0x3c5ae7[_0xbb10('0x19')](_0x2c89b9)[_0xbb10('0x29')](_0x4e25ff);};}exports[_0xbb10('0x2a')]=function(_0x4aabb9,_0x3796c7){var _0x21ac54={},_0xfc3595={},_0x2e0249={'count':0x0,'rows':[]};var _0x1d30aa=_[_0xbb10('0x2b')](db['VoiceCallReport'][_0xbb10('0x2c')],function(_0x4ee02e){return{'name':_0x4ee02e[_0xbb10('0x2d')],'type':_0x4ee02e['type'][_0xbb10('0x2e')]};});_0xfc3595[_0xbb10('0x2f')]=_[_0xbb10('0x2b')](_0x1d30aa,'name');_0xfc3595['query']=_[_0xbb10('0x30')](_0x4aabb9[_0xbb10('0x31')]);_0xfc3595['filters']=_[_0xbb10('0x32')](_0xfc3595[_0xbb10('0x2f')],_0xfc3595[_0xbb10('0x31')]);_0x21ac54[_0xbb10('0x33')]=_[_0xbb10('0x32')](_0xfc3595[_0xbb10('0x2f')],qs[_0xbb10('0x34')](_0x4aabb9['query'][_0xbb10('0x34')]));_0x21ac54[_0xbb10('0x33')]=_0x21ac54[_0xbb10('0x33')][_0xbb10('0x35')]?_0x21ac54[_0xbb10('0x33')]:_0xfc3595[_0xbb10('0x2f')];if(!_0x4aabb9[_0xbb10('0x31')][_0xbb10('0x36')](_0xbb10('0x37'))){_0x21ac54['limit']=qs[_0xbb10('0x1c')](_0x4aabb9[_0xbb10('0x31')][_0xbb10('0x1c')]);_0x21ac54[_0xbb10('0x1b')]=qs['offset'](_0x4aabb9[_0xbb10('0x31')]['offset']);}_0x21ac54['order']=qs[_0xbb10('0x38')](_0x4aabb9[_0xbb10('0x31')][_0xbb10('0x38')]);_0x21ac54[_0xbb10('0x39')]=qs[_0xbb10('0x3a')](_[_0xbb10('0x3b')](_0x4aabb9['query'],_0xfc3595[_0xbb10('0x3a')]),_0x1d30aa);if(_0x4aabb9[_0xbb10('0x31')]['filter']){_0x21ac54['where']=_['merge'](_0x21ac54[_0xbb10('0x39')],{'$or':_[_0xbb10('0x2b')](_0x1d30aa,function(_0x2b658a){if(_0x2b658a['type']!==_0xbb10('0x3c')){var _0x3e8538={};_0x3e8538[_0x2b658a[_0xbb10('0x28')]]={'$like':'%'+_0x4aabb9['query'][_0xbb10('0x3d')]+'%'};return _0x3e8538;}})});}_0x21ac54=_[_0xbb10('0x3e')]({},_0x21ac54,_0x4aabb9[_0xbb10('0x3f')]);var _0x446f49={'where':_0x21ac54['where']};return db[_0xbb10('0x40')][_0xbb10('0x1e')](_0x446f49)['then'](function(_0xe2040f){_0x2e0249[_0xbb10('0x1e')]=_0xe2040f;if(_0x4aabb9[_0xbb10('0x31')][_0xbb10('0x41')]){_0x21ac54[_0xbb10('0x42')]=[{'attributes':['id',_0xbb10('0x28'),'fullname',_0xbb10('0x43')],'model':db[_0xbb10('0x44')],'as':_0xbb10('0x44')}];}return db[_0xbb10('0x40')]['findAll'](_0x21ac54);})[_0xbb10('0x23')](function(_0x331751){_0x2e0249[_0xbb10('0x45')]=_0x331751;return _0x2e0249;})[_0xbb10('0x23')](respondWithFilteredResult(_0x3796c7,_0x21ac54))['catch'](handleError(_0x3796c7,null));};exports[_0xbb10('0x46')]=function(_0x202c60,_0x54ac18){var _0x5d9a4f={'raw':!![],'where':{'id':_0x202c60['params']['id']}},_0x38d78f={};_0x38d78f[_0xbb10('0x2f')]=_[_0xbb10('0x30')](db['VoiceCallReport'][_0xbb10('0x2c')]);_0x38d78f[_0xbb10('0x31')]=_[_0xbb10('0x30')](_0x202c60['query']);_0x38d78f[_0xbb10('0x3a')]=_[_0xbb10('0x32')](_0x38d78f[_0xbb10('0x2f')],_0x38d78f[_0xbb10('0x31')]);_0x5d9a4f[_0xbb10('0x33')]=_[_0xbb10('0x32')](_0x38d78f[_0xbb10('0x2f')],qs[_0xbb10('0x34')](_0x202c60[_0xbb10('0x31')][_0xbb10('0x34')]));_0x5d9a4f[_0xbb10('0x33')]=_0x5d9a4f[_0xbb10('0x33')]['length']?_0x5d9a4f[_0xbb10('0x33')]:_0x38d78f[_0xbb10('0x2f')];if(_0x202c60['query'][_0xbb10('0x41')]){_0x5d9a4f[_0xbb10('0x42')]=[{'all':!![]}];}_0x5d9a4f=_[_0xbb10('0x3e')]({},_0x5d9a4f,_0x202c60[_0xbb10('0x3f')]);return db[_0xbb10('0x40')][_0xbb10('0x47')](_0x5d9a4f)[_0xbb10('0x23')](handleEntityNotFound(_0x54ac18,null))['then'](respondWithResult(_0x54ac18,null))['catch'](handleError(_0x54ac18,null));};exports[_0xbb10('0x48')]=function(_0x76a208,_0x2b12bd){return db['VoiceCallReport']['create'](_0x76a208[_0xbb10('0x49')],{})[_0xbb10('0x23')](respondWithResult(_0x2b12bd,0xc9))[_0xbb10('0x4a')](handleError(_0x2b12bd,null));};exports[_0xbb10('0x24')]=function(_0x10159b,_0x22b315){return db[_0xbb10('0x40')][_0xbb10('0x47')]({'where':{'id':_0x10159b[_0xbb10('0x4b')]['id']}})[_0xbb10('0x23')](handleEntityNotFound(_0x22b315,null))['then'](removeEntity(_0x22b315,null))['catch'](handleError(_0x22b315,null));};exports[_0xbb10('0x4c')]=function(_0x467dba,_0x36ab7d){return db[_0xbb10('0x40')][_0xbb10('0x4c')]()[_0xbb10('0x23')](respondWithResult(_0x36ab7d,null))[_0xbb10('0x4a')](handleError(_0x36ab7d,null));};exports[_0xbb10('0x22')]=function(_0x1c0d8f,_0x1214f7){if(_0x1c0d8f[_0xbb10('0x49')][_0xbb10('0x4d')]){delete _0x1c0d8f[_0xbb10('0x49')][_0xbb10('0x4d')];}return db[_0xbb10('0x40')]['find']({'where':{'uniqueid':_0x1c0d8f[_0xbb10('0x4b')]['id'],'UserId':{'$or':[null,_0x1c0d8f['user']['id']]}}})[_0xbb10('0x23')](handleEntityNotFound(_0x1214f7,null))[_0xbb10('0x23')](saveUpdates(_0x1c0d8f[_0xbb10('0x49')],null))[_0xbb10('0x23')](respondWithResult(_0x1214f7,null))[_0xbb10('0x4a')](handleError(_0x1214f7,null));};
\ No newline at end of file