Built motion from commit 52c8a02d.|2.6.29
[motion2.git] / server / api / voiceCallReport / voiceCallReport.controller.js
index 3720ab8..ffcd038 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xadb5=['filter','VIRTUAL','merge','options','includeAll','include','fullname','User','findAll','rows','show','rawAttributes','length','find','catch','body','params','describe','uniqueid','rimraf','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','update','then','destroy','end','stack','name','send','index','map','VoiceCallReport','fieldName','type','key','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','pick','filters'];(function(_0xfd5f37,_0x24a79c){var _0x11bd01=function(_0x4ae9bd){while(--_0x4ae9bd){_0xfd5f37['push'](_0xfd5f37['shift']());}};_0x11bd01(++_0x24a79c);}(_0xadb5,0xad));var _0x5adb=function(_0x359981,_0x5e594e){_0x359981=_0x359981-0x0;var _0x283100=_0xadb5[_0x359981];return _0x283100;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x5adb('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x5adb('0x1'));var rp=require(_0x5adb('0x2'));var moment=require(_0x5adb('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x5adb('0x4'));var util=require(_0x5adb('0x5'));var path=require(_0x5adb('0x6'));var sox=require('sox');var csv=require(_0x5adb('0x7'));var ejs=require(_0x5adb('0x8'));var fs=require('fs');var fs_extra=require(_0x5adb('0x9'));var _=require(_0x5adb('0xa'));var squel=require(_0x5adb('0xb'));var crypto=require(_0x5adb('0xc'));var jsforce=require(_0x5adb('0xd'));var deskjs=require(_0x5adb('0xe'));var toCsv=require(_0x5adb('0x7'));var querystring=require(_0x5adb('0xf'));var Papa=require(_0x5adb('0x10'));var Redis=require(_0x5adb('0x11'));var authService=require(_0x5adb('0x12'));var qs=require(_0x5adb('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x5adb('0x14'))(_0x5adb('0x15'));var utils=require(_0x5adb('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x5adb('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2a0b70,_0x5433bf){_0x5433bf=_0x5433bf||0xcc;return function(_0x8cfcc6){if(_0x8cfcc6){return _0x2a0b70[_0x5adb('0x18')](_0x5433bf);}return _0x2a0b70[_0x5adb('0x19')](_0x5433bf)['end']();};}function respondWithResult(_0x2a545b,_0x34af2c){_0x34af2c=_0x34af2c||0xc8;return function(_0xf82f72){if(_0xf82f72){return _0x2a545b['status'](_0x34af2c)[_0x5adb('0x1a')](_0xf82f72);}};}function respondWithFilteredResult(_0x518823,_0x367d82){return function(_0x42a482){if(_0x42a482){var _0x30614e=typeof _0x367d82[_0x5adb('0x1b')]===_0x5adb('0x1c')&&typeof _0x367d82[_0x5adb('0x1d')]===_0x5adb('0x1c');var _0x42f4c6=_0x42a482[_0x5adb('0x1e')];var _0x529b65=_0x30614e?0x0:_0x367d82[_0x5adb('0x1b')];var _0x5de028=_0x30614e?_0x42a482[_0x5adb('0x1e')]:_0x367d82['offset']+_0x367d82[_0x5adb('0x1d')];var _0x50e84f;if(_0x5de028>=_0x42f4c6){_0x5de028=_0x42f4c6;_0x50e84f=0xc8;}else{_0x50e84f=0xce;}_0x518823['status'](_0x50e84f);return _0x518823[_0x5adb('0x1f')](_0x5adb('0x20'),_0x529b65+'-'+_0x5de028+'/'+_0x42f4c6)[_0x5adb('0x1a')](_0x42a482);}return null;};}function patchUpdates(_0x1fd4a7){return function(_0x99bc6c){try{jsonpatch['apply'](_0x99bc6c,_0x1fd4a7,!![]);}catch(_0x3255b3){return BPromise['reject'](_0x3255b3);}return _0x99bc6c['save']();};}function saveUpdates(_0x3754cc,_0x379b33){return function(_0x1a38d3){if(_0x1a38d3){return _0x1a38d3[_0x5adb('0x21')](_0x3754cc)[_0x5adb('0x22')](function(_0x413911){return _0x413911;});}return null;};}function removeEntity(_0xfd9bb9,_0x4ca150){return function(_0x4b1957){if(_0x4b1957){return _0x4b1957[_0x5adb('0x23')]()[_0x5adb('0x22')](function(){_0xfd9bb9[_0x5adb('0x19')](0xcc)[_0x5adb('0x24')]();});}};}function handleEntityNotFound(_0x49f203,_0x2fee18){return function(_0x2e1e63){if(!_0x2e1e63){_0x49f203['sendStatus'](0x194);}return _0x2e1e63;};}function handleError(_0x1feecf,_0x1ded9f){_0x1ded9f=_0x1ded9f||0x1f4;return function(_0x1a0acd){logger['error'](_0x1a0acd[_0x5adb('0x25')]);if(_0x1a0acd[_0x5adb('0x26')]){delete _0x1a0acd[_0x5adb('0x26')];}_0x1feecf[_0x5adb('0x19')](_0x1ded9f)[_0x5adb('0x27')](_0x1a0acd);};}exports[_0x5adb('0x28')]=function(_0x4a5d46,_0x49992e){var _0x5d457e={},_0x39bddd={},_0x1eac55={'count':0x0,'rows':[]};var _0x60a672=_[_0x5adb('0x29')](db[_0x5adb('0x2a')]['rawAttributes'],function(_0x11ec2a){return{'name':_0x11ec2a[_0x5adb('0x2b')],'type':_0x11ec2a[_0x5adb('0x2c')][_0x5adb('0x2d')]};});_0x39bddd[_0x5adb('0x2e')]=_[_0x5adb('0x29')](_0x60a672,_0x5adb('0x26'));_0x39bddd[_0x5adb('0x2f')]=_[_0x5adb('0x30')](_0x4a5d46[_0x5adb('0x2f')]);_0x39bddd['filters']=_[_0x5adb('0x31')](_0x39bddd['model'],_0x39bddd[_0x5adb('0x2f')]);_0x5d457e[_0x5adb('0x32')]=_['intersection'](_0x39bddd[_0x5adb('0x2e')],qs[_0x5adb('0x33')](_0x4a5d46[_0x5adb('0x2f')]['fields']));_0x5d457e[_0x5adb('0x32')]=_0x5d457e[_0x5adb('0x32')]['length']?_0x5d457e['attributes']:_0x39bddd[_0x5adb('0x2e')];if(!_0x4a5d46['query'][_0x5adb('0x34')](_0x5adb('0x35'))){_0x5d457e[_0x5adb('0x1d')]=qs[_0x5adb('0x1d')](_0x4a5d46[_0x5adb('0x2f')]['limit']);_0x5d457e[_0x5adb('0x1b')]=qs[_0x5adb('0x1b')](_0x4a5d46[_0x5adb('0x2f')]['offset']);}_0x5d457e['order']=qs[_0x5adb('0x36')](_0x4a5d46[_0x5adb('0x2f')]['sort']);_0x5d457e[_0x5adb('0x37')]=qs['filters'](_[_0x5adb('0x38')](_0x4a5d46['query'],_0x39bddd[_0x5adb('0x39')]),_0x60a672);if(_0x4a5d46['query'][_0x5adb('0x3a')]){_0x5d457e[_0x5adb('0x37')]=_['merge'](_0x5d457e[_0x5adb('0x37')],{'$or':_['map'](_0x60a672,function(_0xadbe37){if(_0xadbe37[_0x5adb('0x2c')]!==_0x5adb('0x3b')){var _0x50edd1={};_0x50edd1[_0xadbe37[_0x5adb('0x26')]]={'$like':'%'+_0x4a5d46[_0x5adb('0x2f')][_0x5adb('0x3a')]+'%'};return _0x50edd1;}})});}_0x5d457e=_[_0x5adb('0x3c')]({},_0x5d457e,_0x4a5d46[_0x5adb('0x3d')]);var _0x52d74f={'where':_0x5d457e['where']};return db['VoiceCallReport']['count'](_0x52d74f)[_0x5adb('0x22')](function(_0x2fbe14){_0x1eac55[_0x5adb('0x1e')]=_0x2fbe14;if(_0x4a5d46[_0x5adb('0x2f')][_0x5adb('0x3e')]){_0x5d457e[_0x5adb('0x3f')]=[{'attributes':['id',_0x5adb('0x26'),_0x5adb('0x40'),'alias'],'model':db['User'],'as':_0x5adb('0x41')}];}return db['VoiceCallReport'][_0x5adb('0x42')](_0x5d457e);})[_0x5adb('0x22')](function(_0x299746){_0x1eac55[_0x5adb('0x43')]=_0x299746;return _0x1eac55;})[_0x5adb('0x22')](respondWithFilteredResult(_0x49992e,_0x5d457e))['catch'](handleError(_0x49992e,null));};exports[_0x5adb('0x44')]=function(_0x565b03,_0x508690){var _0x4160ad={'raw':!![],'where':{'id':_0x565b03['params']['id']}},_0x1a256c={};_0x1a256c[_0x5adb('0x2e')]=_[_0x5adb('0x30')](db[_0x5adb('0x2a')][_0x5adb('0x45')]);_0x1a256c[_0x5adb('0x2f')]=_[_0x5adb('0x30')](_0x565b03[_0x5adb('0x2f')]);_0x1a256c['filters']=_['intersection'](_0x1a256c[_0x5adb('0x2e')],_0x1a256c[_0x5adb('0x2f')]);_0x4160ad[_0x5adb('0x32')]=_[_0x5adb('0x31')](_0x1a256c['model'],qs['fields'](_0x565b03[_0x5adb('0x2f')][_0x5adb('0x33')]));_0x4160ad[_0x5adb('0x32')]=_0x4160ad[_0x5adb('0x32')][_0x5adb('0x46')]?_0x4160ad['attributes']:_0x1a256c[_0x5adb('0x2e')];if(_0x565b03[_0x5adb('0x2f')]['includeAll']){_0x4160ad[_0x5adb('0x3f')]=[{'all':!![]}];}_0x4160ad=_[_0x5adb('0x3c')]({},_0x4160ad,_0x565b03[_0x5adb('0x3d')]);return db[_0x5adb('0x2a')][_0x5adb('0x47')](_0x4160ad)[_0x5adb('0x22')](handleEntityNotFound(_0x508690,null))[_0x5adb('0x22')](respondWithResult(_0x508690,null))[_0x5adb('0x48')](handleError(_0x508690,null));};exports['create']=function(_0x3a925b,_0x57dc8b){return db['VoiceCallReport']['create'](_0x3a925b[_0x5adb('0x49')],{})[_0x5adb('0x22')](respondWithResult(_0x57dc8b,0xc9))[_0x5adb('0x48')](handleError(_0x57dc8b,null));};exports['destroy']=function(_0x2ad69d,_0x5cbab5){return db[_0x5adb('0x2a')][_0x5adb('0x47')]({'where':{'id':_0x2ad69d[_0x5adb('0x4a')]['id']}})['then'](handleEntityNotFound(_0x5cbab5,null))[_0x5adb('0x22')](removeEntity(_0x5cbab5,null))['catch'](handleError(_0x5cbab5,null));};exports[_0x5adb('0x4b')]=function(_0x6dc067,_0x55c535){return db[_0x5adb('0x2a')][_0x5adb('0x4b')]()[_0x5adb('0x22')](respondWithResult(_0x55c535,null))[_0x5adb('0x48')](handleError(_0x55c535,null));};exports[_0x5adb('0x21')]=function(_0x4cb36c,_0x36b847){if(_0x4cb36c[_0x5adb('0x49')][_0x5adb('0x4c')]){delete _0x4cb36c[_0x5adb('0x49')]['uniqueid'];}return db[_0x5adb('0x2a')][_0x5adb('0x47')]({'where':{'uniqueid':_0x4cb36c[_0x5adb('0x4a')]['id'],'UserId':{'$or':[null,_0x4cb36c['user']['id']]}}})[_0x5adb('0x22')](handleEntityNotFound(_0x36b847,null))[_0x5adb('0x22')](saveUpdates(_0x4cb36c[_0x5adb('0x49')],null))[_0x5adb('0x22')](respondWithResult(_0x36b847,null))['catch'](handleError(_0x36b847,null));};
\ No newline at end of file
+var _0xe3b3=['alias','User','VoiceCallReport','findAll','rows','catch','show','params','options','find','create','body','describe','user','uniqueid','lodash','../../components/parsers/qs','../../config/logger','api','../../mysqldb','promise-retry','status','offset','undefined','limit','count','set','Content-Range','json','update','then','destroy','end','sendStatus','error','send','index','map','rawAttributes','fieldName','type','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','sort','filters','pick','filter','where','VIRTUAL','name','merge','includeAll','include','fullname'];(function(_0x4709c0,_0x3396c7){var _0x13348b=function(_0x426235){while(--_0x426235){_0x4709c0['push'](_0x4709c0['shift']());}};_0x13348b(++_0x3396c7);}(_0xe3b3,0x1b3));var _0x3e3b=function(_0xec4748,_0x326f0a){_0xec4748=_0xec4748-0x0;var _0x61bd60=_0xe3b3[_0xec4748];return _0x61bd60;};'use strict';var _=require(_0x3e3b('0x0'));var qs=require(_0x3e3b('0x1'));var logger=require(_0x3e3b('0x2'))(_0x3e3b('0x3'));var db=require(_0x3e3b('0x4'))['db'];const promiseRetry=require(_0x3e3b('0x5'));function respondWithResult(_0x1e813f,_0x4d1684){_0x4d1684=_0x4d1684||0xc8;return function(_0xcfab31){if(_0xcfab31){return _0x1e813f[_0x3e3b('0x6')](_0x4d1684)['json'](_0xcfab31);}};}function respondWithFilteredResult(_0xa2e5c6,_0x3fd79a){return function(_0x410458){if(_0x410458){var _0x57c8f9=typeof _0x3fd79a[_0x3e3b('0x7')]===_0x3e3b('0x8')&&typeof _0x3fd79a[_0x3e3b('0x9')]===_0x3e3b('0x8');var _0x7a1a4e=_0x410458[_0x3e3b('0xa')];var _0x214205=_0x57c8f9?0x0:_0x3fd79a[_0x3e3b('0x7')];var _0x2d4664=_0x57c8f9?_0x410458['count']:_0x3fd79a[_0x3e3b('0x7')]+_0x3fd79a['limit'];var _0x3c9a90;if(_0x2d4664>=_0x7a1a4e){_0x2d4664=_0x7a1a4e;_0x3c9a90=0xc8;}else{_0x3c9a90=0xce;}_0xa2e5c6[_0x3e3b('0x6')](_0x3c9a90);return _0xa2e5c6[_0x3e3b('0xb')](_0x3e3b('0xc'),_0x214205+'-'+_0x2d4664+'/'+_0x7a1a4e)[_0x3e3b('0xd')](_0x410458);}return null;};}function saveUpdates(_0x32a679){return function(_0x1ae7a6){if(_0x1ae7a6){return _0x1ae7a6[_0x3e3b('0xe')](_0x32a679)[_0x3e3b('0xf')](function(_0x400423){return _0x400423;});}return null;};}function removeEntity(_0xd98377){return function(_0x404a2d){if(_0x404a2d){return _0x404a2d[_0x3e3b('0x10')]()[_0x3e3b('0xf')](function(){_0xd98377[_0x3e3b('0x6')](0xcc)[_0x3e3b('0x11')]();});}};}function handleEntityNotFound(_0x40450a){return function(_0x4fffd3){if(!_0x4fffd3){_0x40450a[_0x3e3b('0x12')](0x194);}return _0x4fffd3;};}function handleError(_0x537e66,_0x45f5d5){_0x45f5d5=_0x45f5d5||0x1f4;return function(_0x17044d){logger[_0x3e3b('0x13')](_0x17044d['stack']);if(_0x17044d['name']){delete _0x17044d['name'];}_0x537e66[_0x3e3b('0x6')](_0x45f5d5)[_0x3e3b('0x14')](_0x17044d);};}exports[_0x3e3b('0x15')]=function(_0x35fc4e,_0x3b1573){var _0x1cd81d={},_0x375624={},_0x42d031={'count':0x0,'rows':[]};var _0x4f4799=_[_0x3e3b('0x16')](db['VoiceCallReport'][_0x3e3b('0x17')],function(_0x1eb56f){return{'name':_0x1eb56f[_0x3e3b('0x18')],'type':_0x1eb56f[_0x3e3b('0x19')]['key']};});_0x375624[_0x3e3b('0x1a')]=_[_0x3e3b('0x16')](_0x4f4799,'name');_0x375624[_0x3e3b('0x1b')]=_[_0x3e3b('0x1c')](_0x35fc4e['query']);_0x375624['filters']=_[_0x3e3b('0x1d')](_0x375624[_0x3e3b('0x1a')],_0x375624[_0x3e3b('0x1b')]);_0x1cd81d[_0x3e3b('0x1e')]=_[_0x3e3b('0x1d')](_0x375624[_0x3e3b('0x1a')],qs[_0x3e3b('0x1f')](_0x35fc4e[_0x3e3b('0x1b')][_0x3e3b('0x1f')]));_0x1cd81d[_0x3e3b('0x1e')]=_0x1cd81d[_0x3e3b('0x1e')][_0x3e3b('0x20')]?_0x1cd81d[_0x3e3b('0x1e')]:_0x375624[_0x3e3b('0x1a')];if(!_0x35fc4e[_0x3e3b('0x1b')][_0x3e3b('0x21')]('nolimit')){_0x1cd81d[_0x3e3b('0x9')]=qs[_0x3e3b('0x9')](_0x35fc4e[_0x3e3b('0x1b')]['limit']);_0x1cd81d[_0x3e3b('0x7')]=qs['offset'](_0x35fc4e[_0x3e3b('0x1b')]['offset']);}_0x1cd81d['order']=qs[_0x3e3b('0x22')](_0x35fc4e[_0x3e3b('0x1b')][_0x3e3b('0x22')]);_0x1cd81d['where']=qs[_0x3e3b('0x23')](_[_0x3e3b('0x24')](_0x35fc4e['query'],_0x375624[_0x3e3b('0x23')]),_0x4f4799);if(_0x35fc4e[_0x3e3b('0x1b')][_0x3e3b('0x25')]){_0x1cd81d[_0x3e3b('0x26')]=_['merge'](_0x1cd81d[_0x3e3b('0x26')],{'$or':_[_0x3e3b('0x16')](_0x4f4799,function(_0x17c41a){if(_0x17c41a[_0x3e3b('0x19')]!==_0x3e3b('0x27')){var _0x534968={};_0x534968[_0x17c41a[_0x3e3b('0x28')]]={'$like':'%'+_0x35fc4e['query'][_0x3e3b('0x25')]+'%'};return _0x534968;}})});}_0x1cd81d=_[_0x3e3b('0x29')]({},_0x1cd81d,_0x35fc4e['options']);var _0x2c65f7={'where':_0x1cd81d[_0x3e3b('0x26')]};return db['VoiceCallReport'][_0x3e3b('0xa')](_0x2c65f7)['then'](function(_0x16302d){_0x42d031[_0x3e3b('0xa')]=_0x16302d;if(_0x35fc4e[_0x3e3b('0x1b')][_0x3e3b('0x2a')]){_0x1cd81d[_0x3e3b('0x2b')]=[{'attributes':['id',_0x3e3b('0x28'),_0x3e3b('0x2c'),_0x3e3b('0x2d')],'model':db['User'],'as':_0x3e3b('0x2e')}];}return db[_0x3e3b('0x2f')][_0x3e3b('0x30')](_0x1cd81d);})['then'](function(_0x482d2b){_0x42d031[_0x3e3b('0x31')]=_0x482d2b;return _0x42d031;})[_0x3e3b('0xf')](respondWithFilteredResult(_0x3b1573,_0x1cd81d))[_0x3e3b('0x32')](handleError(_0x3b1573,null));};exports[_0x3e3b('0x33')]=function(_0x1514a2,_0x156b7a){var _0x33a599={'raw':!![],'where':{'id':_0x1514a2[_0x3e3b('0x34')]['id']}},_0x189c21={};_0x189c21['model']=_[_0x3e3b('0x1c')](db['VoiceCallReport'][_0x3e3b('0x17')]);_0x189c21[_0x3e3b('0x1b')]=_[_0x3e3b('0x1c')](_0x1514a2[_0x3e3b('0x1b')]);_0x189c21['filters']=_[_0x3e3b('0x1d')](_0x189c21[_0x3e3b('0x1a')],_0x189c21[_0x3e3b('0x1b')]);_0x33a599[_0x3e3b('0x1e')]=_[_0x3e3b('0x1d')](_0x189c21[_0x3e3b('0x1a')],qs[_0x3e3b('0x1f')](_0x1514a2[_0x3e3b('0x1b')][_0x3e3b('0x1f')]));_0x33a599['attributes']=_0x33a599['attributes'][_0x3e3b('0x20')]?_0x33a599[_0x3e3b('0x1e')]:_0x189c21[_0x3e3b('0x1a')];if(_0x1514a2[_0x3e3b('0x1b')][_0x3e3b('0x2a')]){_0x33a599['include']=[{'all':!![]}];}_0x33a599=_[_0x3e3b('0x29')]({},_0x33a599,_0x1514a2[_0x3e3b('0x35')]);return db[_0x3e3b('0x2f')][_0x3e3b('0x36')](_0x33a599)[_0x3e3b('0xf')](handleEntityNotFound(_0x156b7a,null))[_0x3e3b('0xf')](respondWithResult(_0x156b7a,null))[_0x3e3b('0x32')](handleError(_0x156b7a,null));};exports[_0x3e3b('0x37')]=function(_0x1b032a,_0xba3b07){return db[_0x3e3b('0x2f')][_0x3e3b('0x37')](_0x1b032a[_0x3e3b('0x38')],{})[_0x3e3b('0xf')](respondWithResult(_0xba3b07,0xc9))[_0x3e3b('0x32')](handleError(_0xba3b07,null));};exports[_0x3e3b('0x10')]=function(_0x1b0b8a,_0x5a2148){return db[_0x3e3b('0x2f')][_0x3e3b('0x36')]({'where':{'id':_0x1b0b8a[_0x3e3b('0x34')]['id']}})[_0x3e3b('0xf')](handleEntityNotFound(_0x5a2148,null))[_0x3e3b('0xf')](removeEntity(_0x5a2148,null))[_0x3e3b('0x32')](handleError(_0x5a2148,null));};exports[_0x3e3b('0x39')]=function(_0x505312,_0x913b5a){return db['VoiceCallReport'][_0x3e3b('0x39')]()['then'](respondWithResult(_0x913b5a,null))[_0x3e3b('0x32')](handleError(_0x913b5a,null));};function findForUpdate(_0x370057){return db[_0x3e3b('0x2f')][_0x3e3b('0x36')]({'where':{'uniqueid':_0x370057[_0x3e3b('0x34')]['id'],'UserId':{'$or':[null,_0x370057[_0x3e3b('0x3a')]['id']]}}});}exports['update']=function(_0xb68a70,_0x2f7178){if(_0xb68a70[_0x3e3b('0x38')]['uniqueid']){delete _0xb68a70[_0x3e3b('0x38')]['uniqueid'];}return findForUpdate(_0xb68a70)[_0x3e3b('0xf')](handleEntityNotFound(_0x2f7178,null))['then'](saveUpdates(_0xb68a70[_0x3e3b('0x38')],null))[_0x3e3b('0xf')](respondWithResult(_0x2f7178,null))[_0x3e3b('0x32')](handleError(_0x2f7178,null));};exports['updateWithRetry']=function(_0x56da04,_0x61813d,_0x293266){if(_0x56da04[_0x3e3b('0x38')][_0x3e3b('0x3b')]){delete _0x56da04[_0x3e3b('0x38')][_0x3e3b('0x3b')];}promiseRetry(function(_0x2139a6){return findForUpdate(_0x56da04)[_0x3e3b('0xf')](function(_0x13830e){if(_0x13830e!==null){return _0x13830e;}else{_0x2139a6(new Error('No\x20such\x20report'));}});},{'retries':0x4,'minTimeout':0xfa})[_0x3e3b('0xf')](function(_0x4cba4e){if(!_0x4cba4e){return new Promise(function(_0x276ba2){_0x276ba2(handleEntityNotFound(_0x61813d)());});}else{return _0x4cba4e[_0x3e3b('0xe')](_0x56da04['body'])['then'](function(_0x5616fe){return respondWithResult(_0x61813d)(_0x5616fe);});}},function(){handleEntityNotFound(_0x61813d)();});};
\ No newline at end of file