Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / api / analyticTreeReport / analyticTreeReport.controller.js
index eda27d0..a5ec187 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb612=['length','hasOwnProperty','nolimit','sort','filters','filter','where','VIRTUAL','merge','options','includeAll','findAll','rows','catch','include','create','params','destroy','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','then','end','stack','name','send','render','body','contact','message','agent','interaction','account','map','AnalyticTreeReport','rawAttributes','fieldName','type','key','model','query','keys','intersection','fields','attributes'];(function(_0x18cd5b,_0x10240b){var _0x5eaa52=function(_0x2bccad){while(--_0x2bccad){_0x18cd5b['push'](_0x18cd5b['shift']());}};_0x5eaa52(++_0x10240b);}(_0xb612,0x1a7));var _0x2b61=function(_0x5eb442,_0xe2ae2e){_0x5eb442=_0x5eb442-0x0;var _0x53aad0=_0xb612[_0x5eb442];return _0x53aad0;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x2b61('0x0'));var zipdir=require(_0x2b61('0x1'));var jsonpatch=require(_0x2b61('0x2'));var rp=require(_0x2b61('0x3'));var moment=require(_0x2b61('0x4'));var BPromise=require(_0x2b61('0x5'));var Mustache=require(_0x2b61('0x6'));var util=require(_0x2b61('0x7'));var path=require(_0x2b61('0x8'));var sox=require('sox');var csv=require(_0x2b61('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x2b61('0xa'));var _=require(_0x2b61('0xb'));var squel=require(_0x2b61('0xc'));var crypto=require(_0x2b61('0xd'));var jsforce=require(_0x2b61('0xe'));var deskjs=require(_0x2b61('0xf'));var toCsv=require('to-csv');var querystring=require(_0x2b61('0x10'));var Papa=require(_0x2b61('0x11'));var Redis=require(_0x2b61('0x12'));var authService=require(_0x2b61('0x13'));var qs=require(_0x2b61('0x14'));var as=require(_0x2b61('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x2b61('0x16'))('api');var utils=require(_0x2b61('0x17'));var config=require(_0x2b61('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0x2b61('0x19'))['db'];function respondWithStatusCode(_0x532b91,_0xc4f55b){_0xc4f55b=_0xc4f55b||0xcc;return function(_0x298b8f){if(_0x298b8f){return _0x532b91[_0x2b61('0x1a')](_0xc4f55b);}return _0x532b91[_0x2b61('0x1b')](_0xc4f55b)['end']();};}function respondWithResult(_0x1190b5,_0x33d8ef){_0x33d8ef=_0x33d8ef||0xc8;return function(_0x550b5a){if(_0x550b5a){return _0x1190b5[_0x2b61('0x1b')](_0x33d8ef)[_0x2b61('0x1c')](_0x550b5a);}};}function respondWithFilteredResult(_0x45e460,_0xd11119){return function(_0xd6d128){if(_0xd6d128){var _0x3a3a58=typeof _0xd11119[_0x2b61('0x1d')]==='undefined'&&typeof _0xd11119[_0x2b61('0x1e')]===_0x2b61('0x1f');var _0x56c9c8=_0xd6d128[_0x2b61('0x20')];var _0x2263a0=_0x3a3a58?0x0:_0xd11119[_0x2b61('0x1d')];var _0x4de149=_0x3a3a58?_0xd6d128[_0x2b61('0x20')]:_0xd11119[_0x2b61('0x1d')]+_0xd11119[_0x2b61('0x1e')];var _0x2df3f4;if(_0x4de149>=_0x56c9c8){_0x4de149=_0x56c9c8;_0x2df3f4=0xc8;}else{_0x2df3f4=0xce;}_0x45e460[_0x2b61('0x1b')](_0x2df3f4);return _0x45e460[_0x2b61('0x21')](_0x2b61('0x22'),_0x2263a0+'-'+_0x4de149+'/'+_0x56c9c8)['json'](_0xd6d128);}return null;};}function patchUpdates(_0x51a94b){return function(_0x49875b){try{jsonpatch[_0x2b61('0x23')](_0x49875b,_0x51a94b,!![]);}catch(_0x3bd8ae){return BPromise[_0x2b61('0x24')](_0x3bd8ae);}return _0x49875b[_0x2b61('0x25')]();};}function saveUpdates(_0x1a9e63,_0x3dd5e5){return function(_0x10b7b8){if(_0x10b7b8){return _0x10b7b8[_0x2b61('0x26')](_0x1a9e63)[_0x2b61('0x27')](function(_0x424c05){return _0x424c05;});}return null;};}function removeEntity(_0x6a20eb,_0x10f270){return function(_0x91d695){if(_0x91d695){return _0x91d695['destroy']()['then'](function(){_0x6a20eb[_0x2b61('0x1b')](0xcc)[_0x2b61('0x28')]();});}};}function handleEntityNotFound(_0x13bff7,_0x143294){return function(_0xdf8345){if(!_0xdf8345){_0x13bff7['sendStatus'](0x194);}return _0xdf8345;};}function handleError(_0x2d843d,_0x37729a){_0x37729a=_0x37729a||0x1f4;return function(_0x11c8d4){logger['error'](_0x11c8d4[_0x2b61('0x29')]);if(_0x11c8d4[_0x2b61('0x2a')]){delete _0x11c8d4[_0x2b61('0x2a')];}_0x2d843d['status'](_0x37729a)[_0x2b61('0x2b')](_0x11c8d4);};}function getMustacheRender(_0x33fe5c,_0x43a317){return Mustache[_0x2b61('0x2c')](_0x33fe5c,_['merge'](_0x43a317[_0x2b61('0x2d')],{'contact':_0x43a317[_0x2b61('0x2e')],'message':_0x43a317[_0x2b61('0x2f')],'agent':_0x43a317[_0x2b61('0x30')],'interaction':_0x43a317[_0x2b61('0x31')],'account':_0x43a317[_0x2b61('0x32')]}))||'';}exports['index']=function(_0x190b0f,_0x5900c5){var _0x17ed56={},_0x555d9b={},_0x4823e1={'count':0x0,'rows':[]};var _0x1fef16=_[_0x2b61('0x33')](db[_0x2b61('0x34')][_0x2b61('0x35')],function(_0x432765){return{'name':_0x432765[_0x2b61('0x36')],'type':_0x432765[_0x2b61('0x37')][_0x2b61('0x38')]};});_0x555d9b[_0x2b61('0x39')]=_[_0x2b61('0x33')](_0x1fef16,_0x2b61('0x2a'));_0x555d9b[_0x2b61('0x3a')]=_[_0x2b61('0x3b')](_0x190b0f['query']);_0x555d9b['filters']=_[_0x2b61('0x3c')](_0x555d9b['model'],_0x555d9b[_0x2b61('0x3a')]);_0x17ed56['attributes']=_['intersection'](_0x555d9b[_0x2b61('0x39')],qs['fields'](_0x190b0f[_0x2b61('0x3a')][_0x2b61('0x3d')]));_0x17ed56[_0x2b61('0x3e')]=_0x17ed56[_0x2b61('0x3e')][_0x2b61('0x3f')]?_0x17ed56[_0x2b61('0x3e')]:_0x555d9b['model'];if(!_0x190b0f[_0x2b61('0x3a')][_0x2b61('0x40')](_0x2b61('0x41'))){_0x17ed56[_0x2b61('0x1e')]=qs[_0x2b61('0x1e')](_0x190b0f[_0x2b61('0x3a')][_0x2b61('0x1e')]);_0x17ed56['offset']=qs[_0x2b61('0x1d')](_0x190b0f[_0x2b61('0x3a')][_0x2b61('0x1d')]);}_0x17ed56['order']=qs[_0x2b61('0x42')](_0x190b0f[_0x2b61('0x3a')]['sort']);_0x17ed56['where']=qs['filters'](_['pick'](_0x190b0f[_0x2b61('0x3a')],_0x555d9b[_0x2b61('0x43')]),_0x1fef16);if(_0x190b0f['query'][_0x2b61('0x44')]){_0x17ed56[_0x2b61('0x45')]=_['merge'](_0x17ed56['where'],{'$or':_[_0x2b61('0x33')](_0x1fef16,function(_0x3ecaf0){if(_0x3ecaf0['type']!==_0x2b61('0x46')){var _0x325c2a={};_0x325c2a[_0x3ecaf0['name']]={'$like':'%'+_0x190b0f[_0x2b61('0x3a')][_0x2b61('0x44')]+'%'};return _0x325c2a;}})});}_0x17ed56=_[_0x2b61('0x47')]({},_0x17ed56,_0x190b0f[_0x2b61('0x48')]);var _0x288149={'where':_0x17ed56[_0x2b61('0x45')]};return db[_0x2b61('0x34')][_0x2b61('0x20')](_0x288149)['then'](function(_0x468e52){_0x4823e1[_0x2b61('0x20')]=_0x468e52;if(_0x190b0f['query'][_0x2b61('0x49')]){_0x17ed56['include']=[{'all':!![]}];}return db[_0x2b61('0x34')][_0x2b61('0x4a')](_0x17ed56);})[_0x2b61('0x27')](function(_0x27b197){_0x4823e1[_0x2b61('0x4b')]=_0x27b197;return _0x4823e1;})[_0x2b61('0x27')](respondWithFilteredResult(_0x5900c5,_0x17ed56))[_0x2b61('0x4c')](handleError(_0x5900c5,null));};exports['show']=function(_0x1ee809,_0x3f65a9){var _0x431bbb={'raw':!![],'where':{'id':_0x1ee809['params']['id']}},_0xfc56a2={};_0xfc56a2[_0x2b61('0x39')]=_[_0x2b61('0x3b')](db['AnalyticTreeReport']['rawAttributes']);_0xfc56a2[_0x2b61('0x3a')]=_[_0x2b61('0x3b')](_0x1ee809[_0x2b61('0x3a')]);_0xfc56a2[_0x2b61('0x43')]=_[_0x2b61('0x3c')](_0xfc56a2[_0x2b61('0x39')],_0xfc56a2[_0x2b61('0x3a')]);_0x431bbb[_0x2b61('0x3e')]=_['intersection'](_0xfc56a2[_0x2b61('0x39')],qs[_0x2b61('0x3d')](_0x1ee809[_0x2b61('0x3a')][_0x2b61('0x3d')]));_0x431bbb[_0x2b61('0x3e')]=_0x431bbb['attributes']['length']?_0x431bbb['attributes']:_0xfc56a2[_0x2b61('0x39')];if(_0x1ee809[_0x2b61('0x3a')][_0x2b61('0x49')]){_0x431bbb[_0x2b61('0x4d')]=[{'all':!![]}];}_0x431bbb=_[_0x2b61('0x47')]({},_0x431bbb,_0x1ee809[_0x2b61('0x48')]);return db[_0x2b61('0x34')]['find'](_0x431bbb)[_0x2b61('0x27')](handleEntityNotFound(_0x3f65a9,null))[_0x2b61('0x27')](respondWithResult(_0x3f65a9,null))[_0x2b61('0x4c')](handleError(_0x3f65a9,null));};exports['create']=function(_0x5344a7,_0x4e2b3f){return db['AnalyticTreeReport'][_0x2b61('0x4e')](_0x5344a7['body'],{})[_0x2b61('0x27')](respondWithResult(_0x4e2b3f,0xc9))[_0x2b61('0x4c')](handleError(_0x4e2b3f,null));};exports[_0x2b61('0x26')]=function(_0x168911,_0x527fa7){if(_0x168911[_0x2b61('0x2d')]['id']){delete _0x168911[_0x2b61('0x2d')]['id'];}return db[_0x2b61('0x34')]['find']({'where':{'id':_0x168911[_0x2b61('0x4f')]['id']}})[_0x2b61('0x27')](handleEntityNotFound(_0x527fa7,null))[_0x2b61('0x27')](saveUpdates(_0x168911[_0x2b61('0x2d')],null))['then'](respondWithResult(_0x527fa7,null))['catch'](handleError(_0x527fa7,null));};exports[_0x2b61('0x50')]=function(_0xe62f97,_0x4edb5f){return db[_0x2b61('0x34')]['find']({'where':{'id':_0xe62f97[_0x2b61('0x4f')]['id']}})['then'](handleEntityNotFound(_0x4edb5f,null))[_0x2b61('0x27')](removeEntity(_0x4edb5f,null))[_0x2b61('0x4c')](handleError(_0x4edb5f,null));};
\ No newline at end of file
+var _0x37f5=['undefined','limit','count','set','Content-Range','apply','reject','save','update','destroy','sendStatus','error','stack','name','send','merge','body','contact','message','agent','interaction','map','AnalyticTreeReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','length','sort','filter','where','VIRTUAL','options','include','then','rows','catch','fields','includeAll','find','create','params','eml-format','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x37f5,0xd0));var _0x537f=function(_0x489ba0,_0x50eb73){_0x489ba0=_0x489ba0-0x0;var _0x3ecd6e=_0x37f5[_0x489ba0];return _0x3ecd6e;};'use strict';var emlformat=require(_0x537f('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x537f('0x1'));var jsonpatch=require(_0x537f('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x537f('0x3'));var Mustache=require(_0x537f('0x4'));var util=require(_0x537f('0x5'));var path=require(_0x537f('0x6'));var sox=require(_0x537f('0x7'));var csv=require(_0x537f('0x8'));var ejs=require(_0x537f('0x9'));var fs=require('fs');var fs_extra=require(_0x537f('0xa'));var _=require(_0x537f('0xb'));var squel=require(_0x537f('0xc'));var crypto=require(_0x537f('0xd'));var jsforce=require(_0x537f('0xe'));var deskjs=require(_0x537f('0xf'));var toCsv=require(_0x537f('0x8'));var querystring=require('querystring');var Papa=require(_0x537f('0x10'));var Redis=require(_0x537f('0x11'));var authService=require(_0x537f('0x12'));var qs=require(_0x537f('0x13'));var as=require(_0x537f('0x14'));var hardwareService=require(_0x537f('0x15'));var logger=require(_0x537f('0x16'))(_0x537f('0x17'));var utils=require(_0x537f('0x18'));var config=require(_0x537f('0x19'));var licenseUtil=require(_0x537f('0x1a'));var db=require(_0x537f('0x1b'))['db'];function respondWithStatusCode(_0x484e40,_0x2fb578){_0x2fb578=_0x2fb578||0xcc;return function(_0x18f53b){if(_0x18f53b){return _0x484e40['sendStatus'](_0x2fb578);}return _0x484e40[_0x537f('0x1c')](_0x2fb578)[_0x537f('0x1d')]();};}function respondWithResult(_0x13e3a5,_0x854237){_0x854237=_0x854237||0xc8;return function(_0x2e8fc5){if(_0x2e8fc5){return _0x13e3a5[_0x537f('0x1c')](_0x854237)[_0x537f('0x1e')](_0x2e8fc5);}};}function respondWithFilteredResult(_0x50ca09,_0xb87f41){return function(_0x165350){if(_0x165350){var _0x368f9e=typeof _0xb87f41[_0x537f('0x1f')]===_0x537f('0x20')&&typeof _0xb87f41[_0x537f('0x21')]===_0x537f('0x20');var _0xd84d8e=_0x165350[_0x537f('0x22')];var _0x2966d0=_0x368f9e?0x0:_0xb87f41[_0x537f('0x1f')];var _0x4f2e3a=_0x368f9e?_0x165350['count']:_0xb87f41[_0x537f('0x1f')]+_0xb87f41['limit'];var _0x342e20;if(_0x4f2e3a>=_0xd84d8e){_0x4f2e3a=_0xd84d8e;_0x342e20=0xc8;}else{_0x342e20=0xce;}_0x50ca09[_0x537f('0x1c')](_0x342e20);return _0x50ca09[_0x537f('0x23')](_0x537f('0x24'),_0x2966d0+'-'+_0x4f2e3a+'/'+_0xd84d8e)[_0x537f('0x1e')](_0x165350);}return null;};}function patchUpdates(_0x597fbb){return function(_0x2ef415){try{jsonpatch[_0x537f('0x25')](_0x2ef415,_0x597fbb,!![]);}catch(_0xd205ff){return BPromise[_0x537f('0x26')](_0xd205ff);}return _0x2ef415[_0x537f('0x27')]();};}function saveUpdates(_0x42c36e,_0x398ca8){return function(_0x1a8cd1){if(_0x1a8cd1){return _0x1a8cd1[_0x537f('0x28')](_0x42c36e)['then'](function(_0x3202c4){return _0x3202c4;});}return null;};}function removeEntity(_0x1a94fa,_0x954dac){return function(_0x2e42fd){if(_0x2e42fd){return _0x2e42fd[_0x537f('0x29')]()['then'](function(){_0x1a94fa[_0x537f('0x1c')](0xcc)[_0x537f('0x1d')]();});}};}function handleEntityNotFound(_0x334727,_0x384e5e){return function(_0x4e18b1){if(!_0x4e18b1){_0x334727[_0x537f('0x2a')](0x194);}return _0x4e18b1;};}function handleError(_0x4e7903,_0x7496a8){_0x7496a8=_0x7496a8||0x1f4;return function(_0x342aec){logger[_0x537f('0x2b')](_0x342aec[_0x537f('0x2c')]);if(_0x342aec[_0x537f('0x2d')]){delete _0x342aec[_0x537f('0x2d')];}_0x4e7903['status'](_0x7496a8)[_0x537f('0x2e')](_0x342aec);};}function getMustacheRender(_0x5c9ec9,_0x5ce583){return Mustache['render'](_0x5c9ec9,_[_0x537f('0x2f')](_0x5ce583[_0x537f('0x30')],{'contact':_0x5ce583[_0x537f('0x31')],'message':_0x5ce583[_0x537f('0x32')],'agent':_0x5ce583[_0x537f('0x33')],'interaction':_0x5ce583[_0x537f('0x34')],'account':_0x5ce583['account']}))||'';}exports['index']=function(_0x1a6a0e,_0x468ab3){var _0x15e3c7={},_0xe9a8dd={},_0x2b9b07={'count':0x0,'rows':[]};var _0x243234=_[_0x537f('0x35')](db[_0x537f('0x36')][_0x537f('0x37')],function(_0x83a255){return{'name':_0x83a255[_0x537f('0x38')],'type':_0x83a255[_0x537f('0x39')][_0x537f('0x3a')]};});_0xe9a8dd[_0x537f('0x3b')]=_[_0x537f('0x35')](_0x243234,_0x537f('0x2d'));_0xe9a8dd[_0x537f('0x3c')]=_[_0x537f('0x3d')](_0x1a6a0e[_0x537f('0x3c')]);_0xe9a8dd[_0x537f('0x3e')]=_[_0x537f('0x3f')](_0xe9a8dd[_0x537f('0x3b')],_0xe9a8dd['query']);_0x15e3c7['attributes']=_[_0x537f('0x3f')](_0xe9a8dd[_0x537f('0x3b')],qs['fields'](_0x1a6a0e[_0x537f('0x3c')]['fields']));_0x15e3c7['attributes']=_0x15e3c7[_0x537f('0x40')][_0x537f('0x41')]?_0x15e3c7[_0x537f('0x40')]:_0xe9a8dd[_0x537f('0x3b')];if(!_0x1a6a0e[_0x537f('0x3c')]['hasOwnProperty']('nolimit')){_0x15e3c7[_0x537f('0x21')]=qs['limit'](_0x1a6a0e[_0x537f('0x3c')][_0x537f('0x21')]);_0x15e3c7[_0x537f('0x1f')]=qs[_0x537f('0x1f')](_0x1a6a0e[_0x537f('0x3c')][_0x537f('0x1f')]);}_0x15e3c7['order']=qs[_0x537f('0x42')](_0x1a6a0e[_0x537f('0x3c')][_0x537f('0x42')]);_0x15e3c7['where']=qs[_0x537f('0x3e')](_['pick'](_0x1a6a0e['query'],_0xe9a8dd[_0x537f('0x3e')]),_0x243234);if(_0x1a6a0e[_0x537f('0x3c')][_0x537f('0x43')]){_0x15e3c7[_0x537f('0x44')]=_['merge'](_0x15e3c7['where'],{'$or':_['map'](_0x243234,function(_0x1e2d97){if(_0x1e2d97[_0x537f('0x39')]!==_0x537f('0x45')){var _0xfb2d67={};_0xfb2d67[_0x1e2d97[_0x537f('0x2d')]]={'$like':'%'+_0x1a6a0e[_0x537f('0x3c')][_0x537f('0x43')]+'%'};return _0xfb2d67;}})});}_0x15e3c7=_[_0x537f('0x2f')]({},_0x15e3c7,_0x1a6a0e[_0x537f('0x46')]);var _0x53d89e={'where':_0x15e3c7['where']};return db[_0x537f('0x36')][_0x537f('0x22')](_0x53d89e)['then'](function(_0x1746d8){_0x2b9b07[_0x537f('0x22')]=_0x1746d8;if(_0x1a6a0e[_0x537f('0x3c')]['includeAll']){_0x15e3c7[_0x537f('0x47')]=[{'all':!![]}];}return db[_0x537f('0x36')]['findAll'](_0x15e3c7);})[_0x537f('0x48')](function(_0x5e66c5){_0x2b9b07[_0x537f('0x49')]=_0x5e66c5;return _0x2b9b07;})[_0x537f('0x48')](respondWithFilteredResult(_0x468ab3,_0x15e3c7))[_0x537f('0x4a')](handleError(_0x468ab3,null));};exports['show']=function(_0x373a46,_0x198364){var _0x5f13ee={'raw':!![],'where':{'id':_0x373a46['params']['id']}},_0x38ac7d={};_0x38ac7d[_0x537f('0x3b')]=_[_0x537f('0x3d')](db[_0x537f('0x36')][_0x537f('0x37')]);_0x38ac7d['query']=_[_0x537f('0x3d')](_0x373a46['query']);_0x38ac7d[_0x537f('0x3e')]=_['intersection'](_0x38ac7d[_0x537f('0x3b')],_0x38ac7d[_0x537f('0x3c')]);_0x5f13ee['attributes']=_[_0x537f('0x3f')](_0x38ac7d[_0x537f('0x3b')],qs[_0x537f('0x4b')](_0x373a46[_0x537f('0x3c')][_0x537f('0x4b')]));_0x5f13ee[_0x537f('0x40')]=_0x5f13ee[_0x537f('0x40')]['length']?_0x5f13ee[_0x537f('0x40')]:_0x38ac7d[_0x537f('0x3b')];if(_0x373a46[_0x537f('0x3c')][_0x537f('0x4c')]){_0x5f13ee[_0x537f('0x47')]=[{'all':!![]}];}_0x5f13ee=_[_0x537f('0x2f')]({},_0x5f13ee,_0x373a46[_0x537f('0x46')]);return db[_0x537f('0x36')][_0x537f('0x4d')](_0x5f13ee)[_0x537f('0x48')](handleEntityNotFound(_0x198364,null))[_0x537f('0x48')](respondWithResult(_0x198364,null))[_0x537f('0x4a')](handleError(_0x198364,null));};exports[_0x537f('0x4e')]=function(_0x2dc987,_0x5795de){return db[_0x537f('0x36')][_0x537f('0x4e')](_0x2dc987['body'],{})[_0x537f('0x48')](respondWithResult(_0x5795de,0xc9))[_0x537f('0x4a')](handleError(_0x5795de,null));};exports['update']=function(_0x1e5bd8,_0x769450){if(_0x1e5bd8[_0x537f('0x30')]['id']){delete _0x1e5bd8['body']['id'];}return db[_0x537f('0x36')][_0x537f('0x4d')]({'where':{'id':_0x1e5bd8['params']['id']}})[_0x537f('0x48')](handleEntityNotFound(_0x769450,null))['then'](saveUpdates(_0x1e5bd8['body'],null))[_0x537f('0x48')](respondWithResult(_0x769450,null))[_0x537f('0x4a')](handleError(_0x769450,null));};exports[_0x537f('0x29')]=function(_0x5f07e2,_0x5354fd){return db[_0x537f('0x36')][_0x537f('0x4d')]({'where':{'id':_0x5f07e2[_0x537f('0x4f')]['id']}})[_0x537f('0x48')](handleEntityNotFound(_0x5354fd,null))[_0x537f('0x48')](removeEntity(_0x5354fd,null))[_0x537f('0x4a')](handleError(_0x5354fd,null));};
\ No newline at end of file