Built motion from commit 52c8a02d.|2.6.29
[motion2.git] / server / api / analyticTreeReport / analyticTreeReport.controller.js
index a05e941..fce2584 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1f9f=['pick','filter','merge','VIRTUAL','AnalyticTreeReport','includeAll','include','findAll','rows','show','rawAttributes','options','find','create','body','catch','update','params','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','path','sox','ejs','fs-extra','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','apply','save','destroy','then','error','stack','name','index','map','fieldName','type','key','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters'];(function(_0x37a7c6,_0x3a84b6){var _0x539905=function(_0xa00c20){while(--_0xa00c20){_0x37a7c6['push'](_0x37a7c6['shift']());}};_0x539905(++_0x3a84b6);}(_0x1f9f,0xaa));var _0xf1f9=function(_0x397bb2,_0x98192){_0x397bb2=_0x397bb2-0x0;var _0xab0416=_0x1f9f[_0x397bb2];return _0xab0416;};'use strict';var emlformat=require(_0xf1f9('0x0'));var rimraf=require(_0xf1f9('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xf1f9('0x2'));var rp=require(_0xf1f9('0x3'));var moment=require(_0xf1f9('0x4'));var BPromise=require(_0xf1f9('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0xf1f9('0x6'));var sox=require(_0xf1f9('0x7'));var csv=require('to-csv');var ejs=require(_0xf1f9('0x8'));var fs=require('fs');var fs_extra=require(_0xf1f9('0x9'));var _=require('lodash');var squel=require(_0xf1f9('0xa'));var crypto=require(_0xf1f9('0xb'));var jsforce=require(_0xf1f9('0xc'));var deskjs=require(_0xf1f9('0xd'));var toCsv=require(_0xf1f9('0xe'));var querystring=require(_0xf1f9('0xf'));var Papa=require(_0xf1f9('0x10'));var Redis=require('ioredis');var authService=require(_0xf1f9('0x11'));var qs=require(_0xf1f9('0x12'));var as=require(_0xf1f9('0x13'));var hardwareService=require(_0xf1f9('0x14'));var logger=require('../../config/logger')(_0xf1f9('0x15'));var utils=require(_0xf1f9('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0xf1f9('0x17'));var db=require(_0xf1f9('0x18'))['db'];function respondWithStatusCode(_0x55be9b,_0x413cad){_0x413cad=_0x413cad||0xcc;return function(_0x3c8685){if(_0x3c8685){return _0x55be9b[_0xf1f9('0x19')](_0x413cad);}return _0x55be9b[_0xf1f9('0x1a')](_0x413cad)[_0xf1f9('0x1b')]();};}function respondWithResult(_0x3ba03d,_0x20d418){_0x20d418=_0x20d418||0xc8;return function(_0x201310){if(_0x201310){return _0x3ba03d[_0xf1f9('0x1a')](_0x20d418)[_0xf1f9('0x1c')](_0x201310);}};}function respondWithFilteredResult(_0x3d5dec,_0x4aa909){return function(_0xf4c505){if(_0xf4c505){var _0x5086f8=_0xf4c505[_0xf1f9('0x1d')],_0x5db4a5=_0x4aa909[_0xf1f9('0x1e')],_0x554e4d=_0x4aa909[_0xf1f9('0x1e')]+_0x4aa909[_0xf1f9('0x1f')],_0x3486c1;if(_0x554e4d>=_0x5086f8){_0x554e4d=_0x5086f8;_0x3486c1=0xc8;}else{_0x3486c1=0xce;}_0x3d5dec[_0xf1f9('0x1a')](_0x3486c1);return _0x3d5dec[_0xf1f9('0x20')]('Content-Range',_0x5db4a5+'-'+_0x554e4d+'/'+_0x5086f8)[_0xf1f9('0x1c')](_0xf4c505);}return null;};}function patchUpdates(_0x45c9a7){return function(_0x212e2c){try{jsonpatch[_0xf1f9('0x21')](_0x212e2c,_0x45c9a7,!![]);}catch(_0x4d35e2){return BPromise['reject'](_0x4d35e2);}return _0x212e2c[_0xf1f9('0x22')]();};}function saveUpdates(_0x5ca3e2,_0x329a2d){return function(_0x3a9826){if(_0x3a9826){return _0x3a9826['update'](_0x5ca3e2)['then'](function(_0x560e31){return _0x560e31;});}return null;};}function removeEntity(_0x1f1a71,_0x28b982){return function(_0x1555ae){if(_0x1555ae){return _0x1555ae[_0xf1f9('0x23')]()[_0xf1f9('0x24')](function(){_0x1f1a71[_0xf1f9('0x1a')](0xcc)[_0xf1f9('0x1b')]();});}};}function handleEntityNotFound(_0x519dcb,_0xd01dd0){return function(_0x32f5e1){if(!_0x32f5e1){_0x519dcb[_0xf1f9('0x19')](0x194);}return _0x32f5e1;};}function handleError(_0x5a3ac9,_0x51cab9){_0x51cab9=_0x51cab9||0x1f4;return function(_0x138fa8){logger[_0xf1f9('0x25')](_0x138fa8[_0xf1f9('0x26')]);if(_0x138fa8[_0xf1f9('0x27')]){delete _0x138fa8[_0xf1f9('0x27')];}_0x5a3ac9[_0xf1f9('0x1a')](_0x51cab9)['send'](_0x138fa8);};}exports[_0xf1f9('0x28')]=function(_0x464ce6,_0x39da20){var _0xdb94bc={},_0x1ddb9d={},_0x1d64b2={'count':0x0,'rows':[]};var _0x2d80f0=_[_0xf1f9('0x29')](db['AnalyticTreeReport']['rawAttributes'],function(_0x3c53ce){return{'name':_0x3c53ce[_0xf1f9('0x2a')],'type':_0x3c53ce[_0xf1f9('0x2b')][_0xf1f9('0x2c')]};});_0x1ddb9d[_0xf1f9('0x2d')]=_['map'](_0x2d80f0,'name');_0x1ddb9d[_0xf1f9('0x2e')]=_[_0xf1f9('0x2f')](_0x464ce6[_0xf1f9('0x2e')]);_0x1ddb9d['filters']=_[_0xf1f9('0x30')](_0x1ddb9d[_0xf1f9('0x2d')],_0x1ddb9d[_0xf1f9('0x2e')]);_0xdb94bc['attributes']=_['intersection'](_0x1ddb9d['model'],qs[_0xf1f9('0x31')](_0x464ce6[_0xf1f9('0x2e')][_0xf1f9('0x31')]));_0xdb94bc[_0xf1f9('0x32')]=_0xdb94bc[_0xf1f9('0x32')][_0xf1f9('0x33')]?_0xdb94bc['attributes']:_0x1ddb9d[_0xf1f9('0x2d')];if(!_0x464ce6[_0xf1f9('0x2e')][_0xf1f9('0x34')](_0xf1f9('0x35'))){_0xdb94bc[_0xf1f9('0x1f')]=qs[_0xf1f9('0x1f')](_0x464ce6[_0xf1f9('0x2e')][_0xf1f9('0x1f')]);_0xdb94bc[_0xf1f9('0x1e')]=qs[_0xf1f9('0x1e')](_0x464ce6[_0xf1f9('0x2e')][_0xf1f9('0x1e')]);}_0xdb94bc[_0xf1f9('0x36')]=qs[_0xf1f9('0x37')](_0x464ce6[_0xf1f9('0x2e')][_0xf1f9('0x37')]);_0xdb94bc[_0xf1f9('0x38')]=qs[_0xf1f9('0x39')](_[_0xf1f9('0x3a')](_0x464ce6[_0xf1f9('0x2e')],_0x1ddb9d[_0xf1f9('0x39')]),_0x2d80f0);if(_0x464ce6[_0xf1f9('0x2e')][_0xf1f9('0x3b')]){_0xdb94bc[_0xf1f9('0x38')]=_[_0xf1f9('0x3c')](_0xdb94bc[_0xf1f9('0x38')],{'$or':_[_0xf1f9('0x29')](_0x2d80f0,function(_0x42ebe3){if(_0x42ebe3['type']!==_0xf1f9('0x3d')){var _0x2162aa={};_0x2162aa[_0x42ebe3[_0xf1f9('0x27')]]={'$like':'%'+_0x464ce6[_0xf1f9('0x2e')]['filter']+'%'};return _0x2162aa;}})});}_0xdb94bc=_['merge']({},_0xdb94bc,_0x464ce6['options']);var _0x4abe14={'where':_0xdb94bc[_0xf1f9('0x38')]};return db[_0xf1f9('0x3e')][_0xf1f9('0x1d')](_0x4abe14)[_0xf1f9('0x24')](function(_0x12894a){_0x1d64b2[_0xf1f9('0x1d')]=_0x12894a;if(_0x464ce6[_0xf1f9('0x2e')][_0xf1f9('0x3f')]){_0xdb94bc[_0xf1f9('0x40')]=[{'all':!![]}];}return db[_0xf1f9('0x3e')][_0xf1f9('0x41')](_0xdb94bc);})[_0xf1f9('0x24')](function(_0x31381a){_0x1d64b2[_0xf1f9('0x42')]=_0x31381a;return _0x1d64b2;})[_0xf1f9('0x24')](respondWithFilteredResult(_0x39da20,_0xdb94bc))['catch'](handleError(_0x39da20,null));};exports[_0xf1f9('0x43')]=function(_0x5176b1,_0x4f4e4d){var _0x4204a0={'raw':!![],'where':{'id':_0x5176b1['params']['id']}},_0x200b99={};_0x200b99[_0xf1f9('0x2d')]=_[_0xf1f9('0x2f')](db[_0xf1f9('0x3e')][_0xf1f9('0x44')]);_0x200b99[_0xf1f9('0x2e')]=_[_0xf1f9('0x2f')](_0x5176b1[_0xf1f9('0x2e')]);_0x200b99[_0xf1f9('0x39')]=_['intersection'](_0x200b99[_0xf1f9('0x2d')],_0x200b99[_0xf1f9('0x2e')]);_0x4204a0[_0xf1f9('0x32')]=_[_0xf1f9('0x30')](_0x200b99[_0xf1f9('0x2d')],qs[_0xf1f9('0x31')](_0x5176b1[_0xf1f9('0x2e')][_0xf1f9('0x31')]));_0x4204a0[_0xf1f9('0x32')]=_0x4204a0['attributes']['length']?_0x4204a0[_0xf1f9('0x32')]:_0x200b99[_0xf1f9('0x2d')];if(_0x5176b1[_0xf1f9('0x2e')][_0xf1f9('0x3f')]){_0x4204a0[_0xf1f9('0x40')]=[{'all':!![]}];}_0x4204a0=_['merge']({},_0x4204a0,_0x5176b1[_0xf1f9('0x45')]);return db[_0xf1f9('0x3e')][_0xf1f9('0x46')](_0x4204a0)[_0xf1f9('0x24')](handleEntityNotFound(_0x4f4e4d,null))[_0xf1f9('0x24')](respondWithResult(_0x4f4e4d,null))['catch'](handleError(_0x4f4e4d,null));};exports[_0xf1f9('0x47')]=function(_0x33ffe8,_0x1ca54d){return db[_0xf1f9('0x3e')]['create'](_0x33ffe8[_0xf1f9('0x48')],{})[_0xf1f9('0x24')](respondWithResult(_0x1ca54d,0xc9))[_0xf1f9('0x49')](handleError(_0x1ca54d,null));};exports[_0xf1f9('0x4a')]=function(_0x2821a2,_0x501c69){if(_0x2821a2[_0xf1f9('0x48')]['id']){delete _0x2821a2[_0xf1f9('0x48')]['id'];}return db['AnalyticTreeReport'][_0xf1f9('0x46')]({'where':{'id':_0x2821a2[_0xf1f9('0x4b')]['id']}})[_0xf1f9('0x24')](handleEntityNotFound(_0x501c69,null))[_0xf1f9('0x24')](saveUpdates(_0x2821a2[_0xf1f9('0x48')],null))[_0xf1f9('0x24')](respondWithResult(_0x501c69,null))[_0xf1f9('0x49')](handleError(_0x501c69,null));};exports[_0xf1f9('0x23')]=function(_0x1e8e56,_0x54b9fa){return db['AnalyticTreeReport'][_0xf1f9('0x46')]({'where':{'id':_0x1e8e56[_0xf1f9('0x4b')]['id']}})['then'](handleEntityNotFound(_0x54b9fa,null))['then'](removeEntity(_0x54b9fa,null))[_0xf1f9('0x49')](handleError(_0x54b9fa,null));};
\ No newline at end of file
+var _0xc68b=['sort','where','merge','type','filter','options','AnalyticTreeReport','findAll','rows','catch','show','rawAttributes','includeAll','include','find','create','body','params','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','save','update','then','destroy','error','stack','name','send','map','fieldName','key','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','order'];(function(_0x12e015,_0x480c3e){var _0x47fc1e=function(_0x3a2186){while(--_0x3a2186){_0x12e015['push'](_0x12e015['shift']());}};_0x47fc1e(++_0x480c3e);}(_0xc68b,0x1c8));var _0xbc68=function(_0x1a390c,_0x6d3e27){_0x1a390c=_0x1a390c-0x0;var _0x4aa513=_0xc68b[_0x1a390c];return _0x4aa513;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xbc68('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xbc68('0x1'));var rp=require('request-promise');var moment=require(_0xbc68('0x2'));var BPromise=require(_0xbc68('0x3'));var Mustache=require(_0xbc68('0x4'));var util=require(_0xbc68('0x5'));var path=require(_0xbc68('0x6'));var sox=require(_0xbc68('0x7'));var csv=require(_0xbc68('0x8'));var ejs=require(_0xbc68('0x9'));var fs=require('fs');var fs_extra=require(_0xbc68('0xa'));var _=require('lodash');var squel=require(_0xbc68('0xb'));var crypto=require(_0xbc68('0xc'));var jsforce=require(_0xbc68('0xd'));var deskjs=require(_0xbc68('0xe'));var toCsv=require('to-csv');var querystring=require(_0xbc68('0xf'));var Papa=require(_0xbc68('0x10'));var Redis=require(_0xbc68('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xbc68('0x12'));var as=require(_0xbc68('0x13'));var hardwareService=require(_0xbc68('0x14'));var logger=require(_0xbc68('0x15'))('api');var utils=require('../../config/utils');var config=require(_0xbc68('0x16'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5105ed,_0x4b216b){_0x4b216b=_0x4b216b||0xcc;return function(_0x574fbb){if(_0x574fbb){return _0x5105ed[_0xbc68('0x17')](_0x4b216b);}return _0x5105ed[_0xbc68('0x18')](_0x4b216b)[_0xbc68('0x19')]();};}function respondWithResult(_0x4325ae,_0x59505b){_0x59505b=_0x59505b||0xc8;return function(_0x1d989b){if(_0x1d989b){return _0x4325ae[_0xbc68('0x18')](_0x59505b)[_0xbc68('0x1a')](_0x1d989b);}};}function respondWithFilteredResult(_0x25b825,_0x59c5cb){return function(_0x163daf){if(_0x163daf){var _0x333802=typeof _0x59c5cb['offset']===_0xbc68('0x1b')&&typeof _0x59c5cb[_0xbc68('0x1c')]==='undefined';var _0x1f1335=_0x163daf[_0xbc68('0x1d')];var _0x32764b=_0x333802?0x0:_0x59c5cb[_0xbc68('0x1e')];var _0x20bf26=_0x333802?_0x163daf['count']:_0x59c5cb[_0xbc68('0x1e')]+_0x59c5cb[_0xbc68('0x1c')];var _0xfb16eb;if(_0x20bf26>=_0x1f1335){_0x20bf26=_0x1f1335;_0xfb16eb=0xc8;}else{_0xfb16eb=0xce;}_0x25b825[_0xbc68('0x18')](_0xfb16eb);return _0x25b825[_0xbc68('0x1f')](_0xbc68('0x20'),_0x32764b+'-'+_0x20bf26+'/'+_0x1f1335)[_0xbc68('0x1a')](_0x163daf);}return null;};}function patchUpdates(_0x302ddc){return function(_0x19f2ff){try{jsonpatch[_0xbc68('0x21')](_0x19f2ff,_0x302ddc,!![]);}catch(_0x455106){return BPromise['reject'](_0x455106);}return _0x19f2ff[_0xbc68('0x22')]();};}function saveUpdates(_0x592371,_0x2f68af){return function(_0xd2757f){if(_0xd2757f){return _0xd2757f[_0xbc68('0x23')](_0x592371)[_0xbc68('0x24')](function(_0x4f94cf){return _0x4f94cf;});}return null;};}function removeEntity(_0x101926,_0x54c5fc){return function(_0x4f9924){if(_0x4f9924){return _0x4f9924[_0xbc68('0x25')]()[_0xbc68('0x24')](function(){_0x101926['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x45ed6f,_0x5b11e7){return function(_0x914a14){if(!_0x914a14){_0x45ed6f['sendStatus'](0x194);}return _0x914a14;};}function handleError(_0x35db49,_0x3972ce){_0x3972ce=_0x3972ce||0x1f4;return function(_0x417caa){logger[_0xbc68('0x26')](_0x417caa[_0xbc68('0x27')]);if(_0x417caa[_0xbc68('0x28')]){delete _0x417caa[_0xbc68('0x28')];}_0x35db49['status'](_0x3972ce)[_0xbc68('0x29')](_0x417caa);};}exports['index']=function(_0x4451a3,_0x589634){var _0x1bc7d1={},_0x2c8a4e={},_0x1c3333={'count':0x0,'rows':[]};var _0x58c0fd=_[_0xbc68('0x2a')](db['AnalyticTreeReport']['rawAttributes'],function(_0x1a4ceb){return{'name':_0x1a4ceb[_0xbc68('0x2b')],'type':_0x1a4ceb['type'][_0xbc68('0x2c')]};});_0x2c8a4e['model']=_[_0xbc68('0x2a')](_0x58c0fd,_0xbc68('0x28'));_0x2c8a4e[_0xbc68('0x2d')]=_[_0xbc68('0x2e')](_0x4451a3['query']);_0x2c8a4e[_0xbc68('0x2f')]=_[_0xbc68('0x30')](_0x2c8a4e[_0xbc68('0x31')],_0x2c8a4e[_0xbc68('0x2d')]);_0x1bc7d1[_0xbc68('0x32')]=_[_0xbc68('0x30')](_0x2c8a4e[_0xbc68('0x31')],qs[_0xbc68('0x33')](_0x4451a3['query'][_0xbc68('0x33')]));_0x1bc7d1['attributes']=_0x1bc7d1[_0xbc68('0x32')][_0xbc68('0x34')]?_0x1bc7d1[_0xbc68('0x32')]:_0x2c8a4e[_0xbc68('0x31')];if(!_0x4451a3['query'][_0xbc68('0x35')]('nolimit')){_0x1bc7d1[_0xbc68('0x1c')]=qs['limit'](_0x4451a3[_0xbc68('0x2d')][_0xbc68('0x1c')]);_0x1bc7d1[_0xbc68('0x1e')]=qs[_0xbc68('0x1e')](_0x4451a3[_0xbc68('0x2d')][_0xbc68('0x1e')]);}_0x1bc7d1[_0xbc68('0x36')]=qs[_0xbc68('0x37')](_0x4451a3[_0xbc68('0x2d')][_0xbc68('0x37')]);_0x1bc7d1[_0xbc68('0x38')]=qs[_0xbc68('0x2f')](_['pick'](_0x4451a3[_0xbc68('0x2d')],_0x2c8a4e[_0xbc68('0x2f')]),_0x58c0fd);if(_0x4451a3[_0xbc68('0x2d')]['filter']){_0x1bc7d1['where']=_[_0xbc68('0x39')](_0x1bc7d1[_0xbc68('0x38')],{'$or':_[_0xbc68('0x2a')](_0x58c0fd,function(_0x3625e9){if(_0x3625e9[_0xbc68('0x3a')]!=='VIRTUAL'){var _0x44f7f8={};_0x44f7f8[_0x3625e9['name']]={'$like':'%'+_0x4451a3[_0xbc68('0x2d')][_0xbc68('0x3b')]+'%'};return _0x44f7f8;}})});}_0x1bc7d1=_['merge']({},_0x1bc7d1,_0x4451a3[_0xbc68('0x3c')]);var _0x19ef09={'where':_0x1bc7d1[_0xbc68('0x38')]};return db[_0xbc68('0x3d')]['count'](_0x19ef09)[_0xbc68('0x24')](function(_0x227274){_0x1c3333[_0xbc68('0x1d')]=_0x227274;if(_0x4451a3[_0xbc68('0x2d')]['includeAll']){_0x1bc7d1['include']=[{'all':!![]}];}return db[_0xbc68('0x3d')][_0xbc68('0x3e')](_0x1bc7d1);})[_0xbc68('0x24')](function(_0x37ee07){_0x1c3333[_0xbc68('0x3f')]=_0x37ee07;return _0x1c3333;})['then'](respondWithFilteredResult(_0x589634,_0x1bc7d1))[_0xbc68('0x40')](handleError(_0x589634,null));};exports[_0xbc68('0x41')]=function(_0xd7deb4,_0x19096b){var _0x4acb33={'raw':!![],'where':{'id':_0xd7deb4['params']['id']}},_0x6baf36={};_0x6baf36['model']=_[_0xbc68('0x2e')](db[_0xbc68('0x3d')][_0xbc68('0x42')]);_0x6baf36[_0xbc68('0x2d')]=_['keys'](_0xd7deb4['query']);_0x6baf36[_0xbc68('0x2f')]=_[_0xbc68('0x30')](_0x6baf36[_0xbc68('0x31')],_0x6baf36[_0xbc68('0x2d')]);_0x4acb33[_0xbc68('0x32')]=_[_0xbc68('0x30')](_0x6baf36[_0xbc68('0x31')],qs[_0xbc68('0x33')](_0xd7deb4[_0xbc68('0x2d')][_0xbc68('0x33')]));_0x4acb33[_0xbc68('0x32')]=_0x4acb33[_0xbc68('0x32')]['length']?_0x4acb33[_0xbc68('0x32')]:_0x6baf36[_0xbc68('0x31')];if(_0xd7deb4[_0xbc68('0x2d')][_0xbc68('0x43')]){_0x4acb33[_0xbc68('0x44')]=[{'all':!![]}];}_0x4acb33=_[_0xbc68('0x39')]({},_0x4acb33,_0xd7deb4['options']);return db[_0xbc68('0x3d')][_0xbc68('0x45')](_0x4acb33)[_0xbc68('0x24')](handleEntityNotFound(_0x19096b,null))[_0xbc68('0x24')](respondWithResult(_0x19096b,null))[_0xbc68('0x40')](handleError(_0x19096b,null));};exports[_0xbc68('0x46')]=function(_0x218321,_0x624f94){return db[_0xbc68('0x3d')][_0xbc68('0x46')](_0x218321[_0xbc68('0x47')],{})[_0xbc68('0x24')](respondWithResult(_0x624f94,0xc9))[_0xbc68('0x40')](handleError(_0x624f94,null));};exports[_0xbc68('0x23')]=function(_0x492652,_0x46c745){if(_0x492652[_0xbc68('0x47')]['id']){delete _0x492652[_0xbc68('0x47')]['id'];}return db[_0xbc68('0x3d')]['find']({'where':{'id':_0x492652[_0xbc68('0x48')]['id']}})[_0xbc68('0x24')](handleEntityNotFound(_0x46c745,null))['then'](saveUpdates(_0x492652[_0xbc68('0x47')],null))[_0xbc68('0x24')](respondWithResult(_0x46c745,null))[_0xbc68('0x40')](handleError(_0x46c745,null));};exports[_0xbc68('0x25')]=function(_0x333beb,_0x36c096){return db['AnalyticTreeReport'][_0xbc68('0x45')]({'where':{'id':_0x333beb[_0xbc68('0x48')]['id']}})['then'](handleEntityNotFound(_0x36c096,null))[_0xbc68('0x24')](removeEntity(_0x36c096,null))[_0xbc68('0x40')](handleError(_0x36c096,null));};
\ No newline at end of file