Built motion from commit eddce310.|2.6.12
[motion2.git] / server / api / integrationReport / integrationReport.controller.js
index 2c0b0e8..7b27e6d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9ff7=['offset','Content-Range','reject','save','destroy','then','error','stack','name','send','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','options','IntegrationReport','includeAll','include','findAll','rows','catch','show','params','find','body','update','describe','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','util','path','sox','ejs','fs-extra','lodash','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','count'];(function(_0x214927,_0x4fe5d9){var _0x26921d=function(_0x5caa4d){while(--_0x5caa4d){_0x214927['push'](_0x214927['shift']());}};_0x26921d(++_0x4fe5d9);}(_0x9ff7,0x10c));var _0x79ff=function(_0x1e4663,_0x1ff630){_0x1e4663=_0x1e4663-0x0;var _0x5b2722=_0x9ff7[_0x1e4663];return _0x5b2722;};'use strict';var emlformat=require(_0x79ff('0x0'));var rimraf=require(_0x79ff('0x1'));var zipdir=require(_0x79ff('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x79ff('0x3'));var moment=require(_0x79ff('0x4'));var BPromise=require(_0x79ff('0x5'));var Mustache=require('mustache');var util=require(_0x79ff('0x6'));var path=require(_0x79ff('0x7'));var sox=require(_0x79ff('0x8'));var csv=require('to-csv');var ejs=require(_0x79ff('0x9'));var fs=require('fs');var fs_extra=require(_0x79ff('0xa'));var _=require(_0x79ff('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x79ff('0xc'));var toCsv=require(_0x79ff('0xd'));var querystring=require(_0x79ff('0xe'));var Papa=require(_0x79ff('0xf'));var Redis=require('ioredis');var authService=require(_0x79ff('0x10'));var qs=require(_0x79ff('0x11'));var as=require(_0x79ff('0x12'));var hardwareService=require(_0x79ff('0x13'));var logger=require(_0x79ff('0x14'))(_0x79ff('0x15'));var utils=require(_0x79ff('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x79ff('0x17'));var db=require(_0x79ff('0x18'))['db'];function respondWithStatusCode(_0x410e9c,_0x20575f){_0x20575f=_0x20575f||0xcc;return function(_0x553764){if(_0x553764){return _0x410e9c[_0x79ff('0x19')](_0x20575f);}return _0x410e9c[_0x79ff('0x1a')](_0x20575f)[_0x79ff('0x1b')]();};}function respondWithResult(_0x536504,_0x4e2243){_0x4e2243=_0x4e2243||0xc8;return function(_0x2a8af7){if(_0x2a8af7){return _0x536504[_0x79ff('0x1a')](_0x4e2243)[_0x79ff('0x1c')](_0x2a8af7);}};}function respondWithFilteredResult(_0x2f860d,_0x285592){return function(_0x3f6c1d){if(_0x3f6c1d){var _0x2aa9dc=typeof _0x285592['offset']===_0x79ff('0x1d')&&typeof _0x285592[_0x79ff('0x1e')]===_0x79ff('0x1d');var _0xad7ee2=_0x3f6c1d[_0x79ff('0x1f')];var _0x56487c=_0x2aa9dc?0x0:_0x285592[_0x79ff('0x20')];var _0x179ffb=_0x2aa9dc?_0x3f6c1d[_0x79ff('0x1f')]:_0x285592['offset']+_0x285592[_0x79ff('0x1e')];var _0x410f80;if(_0x179ffb>=_0xad7ee2){_0x179ffb=_0xad7ee2;_0x410f80=0xc8;}else{_0x410f80=0xce;}_0x2f860d[_0x79ff('0x1a')](_0x410f80);return _0x2f860d['set'](_0x79ff('0x21'),_0x56487c+'-'+_0x179ffb+'/'+_0xad7ee2)[_0x79ff('0x1c')](_0x3f6c1d);}return null;};}function patchUpdates(_0x4d50f8){return function(_0x22de4d){try{jsonpatch['apply'](_0x22de4d,_0x4d50f8,!![]);}catch(_0x4c40d9){return BPromise[_0x79ff('0x22')](_0x4c40d9);}return _0x22de4d[_0x79ff('0x23')]();};}function saveUpdates(_0x2825dd,_0xc8cb06){return function(_0x552fcd){if(_0x552fcd){return _0x552fcd['update'](_0x2825dd)['then'](function(_0x23d672){return _0x23d672;});}return null;};}function removeEntity(_0x53310f,_0x33f34a){return function(_0x11a6b4){if(_0x11a6b4){return _0x11a6b4[_0x79ff('0x24')]()[_0x79ff('0x25')](function(){_0x53310f[_0x79ff('0x1a')](0xcc)[_0x79ff('0x1b')]();});}};}function handleEntityNotFound(_0x6f0e7c,_0x4e66c9){return function(_0x50d039){if(!_0x50d039){_0x6f0e7c[_0x79ff('0x19')](0x194);}return _0x50d039;};}function handleError(_0x133305,_0x5e4805){_0x5e4805=_0x5e4805||0x1f4;return function(_0x16b5e8){logger[_0x79ff('0x26')](_0x16b5e8[_0x79ff('0x27')]);if(_0x16b5e8[_0x79ff('0x28')]){delete _0x16b5e8['name'];}_0x133305[_0x79ff('0x1a')](_0x5e4805)[_0x79ff('0x29')](_0x16b5e8);};}exports['index']=function(_0x4ae32c,_0x1f20b3){var _0x3d6f10={},_0x3b158c={},_0x4ff896={'count':0x0,'rows':[]};var _0x2546b9=_[_0x79ff('0x2a')](db['IntegrationReport'][_0x79ff('0x2b')],function(_0x25a4ce){return{'name':_0x25a4ce[_0x79ff('0x2c')],'type':_0x25a4ce[_0x79ff('0x2d')][_0x79ff('0x2e')]};});_0x3b158c[_0x79ff('0x2f')]=_['map'](_0x2546b9,_0x79ff('0x28'));_0x3b158c[_0x79ff('0x30')]=_[_0x79ff('0x31')](_0x4ae32c[_0x79ff('0x30')]);_0x3b158c[_0x79ff('0x32')]=_[_0x79ff('0x33')](_0x3b158c[_0x79ff('0x2f')],_0x3b158c['query']);_0x3d6f10[_0x79ff('0x34')]=_['intersection'](_0x3b158c[_0x79ff('0x2f')],qs[_0x79ff('0x35')](_0x4ae32c['query']['fields']));_0x3d6f10[_0x79ff('0x34')]=_0x3d6f10[_0x79ff('0x34')][_0x79ff('0x36')]?_0x3d6f10[_0x79ff('0x34')]:_0x3b158c[_0x79ff('0x2f')];if(!_0x4ae32c[_0x79ff('0x30')][_0x79ff('0x37')]('nolimit')){_0x3d6f10[_0x79ff('0x1e')]=qs[_0x79ff('0x1e')](_0x4ae32c[_0x79ff('0x30')][_0x79ff('0x1e')]);_0x3d6f10['offset']=qs[_0x79ff('0x20')](_0x4ae32c['query'][_0x79ff('0x20')]);}_0x3d6f10[_0x79ff('0x38')]=qs['sort'](_0x4ae32c[_0x79ff('0x30')][_0x79ff('0x39')]);_0x3d6f10[_0x79ff('0x3a')]=qs[_0x79ff('0x32')](_[_0x79ff('0x3b')](_0x4ae32c[_0x79ff('0x30')],_0x3b158c['filters']),_0x2546b9);if(_0x4ae32c['query'][_0x79ff('0x3c')]){_0x3d6f10[_0x79ff('0x3a')]=_[_0x79ff('0x3d')](_0x3d6f10[_0x79ff('0x3a')],{'$or':_['map'](_0x2546b9,function(_0x8b78ef){if(_0x8b78ef[_0x79ff('0x2d')]!=='VIRTUAL'){var _0x5866e6={};_0x5866e6[_0x8b78ef[_0x79ff('0x28')]]={'$like':'%'+_0x4ae32c[_0x79ff('0x30')]['filter']+'%'};return _0x5866e6;}})});}_0x3d6f10=_[_0x79ff('0x3d')]({},_0x3d6f10,_0x4ae32c[_0x79ff('0x3e')]);var _0x6124a9={'where':_0x3d6f10[_0x79ff('0x3a')]};return db[_0x79ff('0x3f')][_0x79ff('0x1f')](_0x6124a9)[_0x79ff('0x25')](function(_0x5e01db){_0x4ff896[_0x79ff('0x1f')]=_0x5e01db;if(_0x4ae32c['query'][_0x79ff('0x40')]){_0x3d6f10[_0x79ff('0x41')]=[{'all':!![]}];}return db[_0x79ff('0x3f')][_0x79ff('0x42')](_0x3d6f10);})['then'](function(_0x574138){_0x4ff896[_0x79ff('0x43')]=_0x574138;return _0x4ff896;})['then'](respondWithFilteredResult(_0x1f20b3,_0x3d6f10))[_0x79ff('0x44')](handleError(_0x1f20b3,null));};exports[_0x79ff('0x45')]=function(_0x7a3fbc,_0x10f9fd){var _0x1eb1a7={'raw':![],'where':{'id':_0x7a3fbc[_0x79ff('0x46')]['id']}},_0xab1899={};_0xab1899[_0x79ff('0x2f')]=_[_0x79ff('0x31')](db[_0x79ff('0x3f')][_0x79ff('0x2b')]);_0xab1899[_0x79ff('0x30')]=_[_0x79ff('0x31')](_0x7a3fbc[_0x79ff('0x30')]);_0xab1899['filters']=_['intersection'](_0xab1899[_0x79ff('0x2f')],_0xab1899[_0x79ff('0x30')]);_0x1eb1a7[_0x79ff('0x34')]=_[_0x79ff('0x33')](_0xab1899[_0x79ff('0x2f')],qs[_0x79ff('0x35')](_0x7a3fbc['query'][_0x79ff('0x35')]));_0x1eb1a7['attributes']=_0x1eb1a7[_0x79ff('0x34')][_0x79ff('0x36')]?_0x1eb1a7[_0x79ff('0x34')]:_0xab1899[_0x79ff('0x2f')];if(_0x7a3fbc['query'][_0x79ff('0x40')]){_0x1eb1a7[_0x79ff('0x41')]=[{'all':!![]}];}_0x1eb1a7=_['merge']({},_0x1eb1a7,_0x7a3fbc[_0x79ff('0x3e')]);return db['IntegrationReport'][_0x79ff('0x47')](_0x1eb1a7)['then'](handleEntityNotFound(_0x10f9fd,null))[_0x79ff('0x25')](respondWithResult(_0x10f9fd,null))[_0x79ff('0x44')](handleError(_0x10f9fd,null));};exports['create']=function(_0x197197,_0x38cd45){return db[_0x79ff('0x3f')]['create'](_0x197197[_0x79ff('0x48')],{})[_0x79ff('0x25')](respondWithResult(_0x38cd45,0xc9))['catch'](handleError(_0x38cd45,null));};exports[_0x79ff('0x49')]=function(_0xe6ce35,_0x290e84){if(_0xe6ce35[_0x79ff('0x48')]['id']){delete _0xe6ce35['body']['id'];}return db[_0x79ff('0x3f')][_0x79ff('0x47')]({'where':{'id':_0xe6ce35[_0x79ff('0x46')]['id']}})[_0x79ff('0x25')](handleEntityNotFound(_0x290e84,null))['then'](saveUpdates(_0xe6ce35[_0x79ff('0x48')],null))['then'](respondWithResult(_0x290e84,null))[_0x79ff('0x44')](handleError(_0x290e84,null));};exports[_0x79ff('0x24')]=function(_0x2524d4,_0x19fbc1){return db[_0x79ff('0x3f')][_0x79ff('0x47')]({'where':{'id':_0x2524d4[_0x79ff('0x46')]['id']}})[_0x79ff('0x25')](handleEntityNotFound(_0x19fbc1,null))[_0x79ff('0x25')](removeEntity(_0x19fbc1,null))[_0x79ff('0x44')](handleError(_0x19fbc1,null));};exports['describe']=function(_0x2f9845,_0x5addaa){return db[_0x79ff('0x3f')][_0x79ff('0x4a')]()[_0x79ff('0x25')](respondWithResult(_0x5addaa,null))[_0x79ff('0x44')](handleError(_0x5addaa,null));};
\ No newline at end of file
+var _0xd89f=['sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','then','error','stack','name','send','map','IntegrationReport','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','options','includeAll','findAll','rows','catch','show','params','keys','rawAttributes','include','find','create','body','destroy','describe','eml-format','fast-json-patch','request-promise','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xd89f,0x167));var _0xfd89=function(_0xd890c2,_0x2a7cfa){_0xd890c2=_0xd890c2-0x0;var _0x2710dc=_0xd89f[_0xd890c2];return _0x2710dc;};'use strict';var emlformat=require(_0xfd89('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xfd89('0x1'));var rp=require(_0xfd89('0x2'));var moment=require('moment');var BPromise=require(_0xfd89('0x3'));var Mustache=require('mustache');var util=require(_0xfd89('0x4'));var path=require(_0xfd89('0x5'));var sox=require(_0xfd89('0x6'));var csv=require(_0xfd89('0x7'));var ejs=require(_0xfd89('0x8'));var fs=require('fs');var fs_extra=require(_0xfd89('0x9'));var _=require(_0xfd89('0xa'));var squel=require(_0xfd89('0xb'));var crypto=require(_0xfd89('0xc'));var jsforce=require(_0xfd89('0xd'));var deskjs=require(_0xfd89('0xe'));var toCsv=require(_0xfd89('0x7'));var querystring=require('querystring');var Papa=require(_0xfd89('0xf'));var Redis=require(_0xfd89('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xfd89('0x11'));var as=require(_0xfd89('0x12'));var hardwareService=require(_0xfd89('0x13'));var logger=require(_0xfd89('0x14'))(_0xfd89('0x15'));var utils=require(_0xfd89('0x16'));var config=require(_0xfd89('0x17'));var licenseUtil=require(_0xfd89('0x18'));var db=require(_0xfd89('0x19'))['db'];function respondWithStatusCode(_0x154e21,_0x39fe48){_0x39fe48=_0x39fe48||0xcc;return function(_0x5619c2){if(_0x5619c2){return _0x154e21[_0xfd89('0x1a')](_0x39fe48);}return _0x154e21[_0xfd89('0x1b')](_0x39fe48)[_0xfd89('0x1c')]();};}function respondWithResult(_0x11caba,_0x44000f){_0x44000f=_0x44000f||0xc8;return function(_0x6a6b86){if(_0x6a6b86){return _0x11caba[_0xfd89('0x1b')](_0x44000f)[_0xfd89('0x1d')](_0x6a6b86);}};}function respondWithFilteredResult(_0x54da60,_0x191e10){return function(_0x272590){if(_0x272590){var _0x2f0f5e=typeof _0x191e10[_0xfd89('0x1e')]===_0xfd89('0x1f')&&typeof _0x191e10[_0xfd89('0x20')]===_0xfd89('0x1f');var _0x46dcbe=_0x272590[_0xfd89('0x21')];var _0xc3d179=_0x2f0f5e?0x0:_0x191e10[_0xfd89('0x1e')];var _0x432481=_0x2f0f5e?_0x272590['count']:_0x191e10[_0xfd89('0x1e')]+_0x191e10[_0xfd89('0x20')];var _0x5e9520;if(_0x432481>=_0x46dcbe){_0x432481=_0x46dcbe;_0x5e9520=0xc8;}else{_0x5e9520=0xce;}_0x54da60[_0xfd89('0x1b')](_0x5e9520);return _0x54da60[_0xfd89('0x22')](_0xfd89('0x23'),_0xc3d179+'-'+_0x432481+'/'+_0x46dcbe)[_0xfd89('0x1d')](_0x272590);}return null;};}function patchUpdates(_0x4a8015){return function(_0x1840b9){try{jsonpatch[_0xfd89('0x24')](_0x1840b9,_0x4a8015,!![]);}catch(_0xb89dbf){return BPromise['reject'](_0xb89dbf);}return _0x1840b9['save']();};}function saveUpdates(_0x4984a5,_0x3f5ed9){return function(_0x3489f4){if(_0x3489f4){return _0x3489f4['update'](_0x4984a5)['then'](function(_0x28d5a9){return _0x28d5a9;});}return null;};}function removeEntity(_0x285ded,_0x25befd){return function(_0x34ac96){if(_0x34ac96){return _0x34ac96['destroy']()[_0xfd89('0x25')](function(){_0x285ded[_0xfd89('0x1b')](0xcc)[_0xfd89('0x1c')]();});}};}function handleEntityNotFound(_0x2165c9,_0x1767f9){return function(_0x51ef4b){if(!_0x51ef4b){_0x2165c9[_0xfd89('0x1a')](0x194);}return _0x51ef4b;};}function handleError(_0x2517a0,_0x42f797){_0x42f797=_0x42f797||0x1f4;return function(_0x2499b5){logger[_0xfd89('0x26')](_0x2499b5[_0xfd89('0x27')]);if(_0x2499b5[_0xfd89('0x28')]){delete _0x2499b5[_0xfd89('0x28')];}_0x2517a0['status'](_0x42f797)[_0xfd89('0x29')](_0x2499b5);};}exports['index']=function(_0x383dba,_0xe4d5c2){var _0xa1d8db={},_0x278d3a={},_0x1befb7={'count':0x0,'rows':[]};var _0x3b2274=_[_0xfd89('0x2a')](db[_0xfd89('0x2b')]['rawAttributes'],function(_0x45b26a){return{'name':_0x45b26a['fieldName'],'type':_0x45b26a[_0xfd89('0x2c')][_0xfd89('0x2d')]};});_0x278d3a[_0xfd89('0x2e')]=_[_0xfd89('0x2a')](_0x3b2274,_0xfd89('0x28'));_0x278d3a[_0xfd89('0x2f')]=_['keys'](_0x383dba[_0xfd89('0x2f')]);_0x278d3a[_0xfd89('0x30')]=_[_0xfd89('0x31')](_0x278d3a[_0xfd89('0x2e')],_0x278d3a[_0xfd89('0x2f')]);_0xa1d8db[_0xfd89('0x32')]=_['intersection'](_0x278d3a[_0xfd89('0x2e')],qs[_0xfd89('0x33')](_0x383dba[_0xfd89('0x2f')][_0xfd89('0x33')]));_0xa1d8db[_0xfd89('0x32')]=_0xa1d8db[_0xfd89('0x32')][_0xfd89('0x34')]?_0xa1d8db['attributes']:_0x278d3a[_0xfd89('0x2e')];if(!_0x383dba[_0xfd89('0x2f')][_0xfd89('0x35')](_0xfd89('0x36'))){_0xa1d8db[_0xfd89('0x20')]=qs[_0xfd89('0x20')](_0x383dba[_0xfd89('0x2f')][_0xfd89('0x20')]);_0xa1d8db[_0xfd89('0x1e')]=qs[_0xfd89('0x1e')](_0x383dba[_0xfd89('0x2f')][_0xfd89('0x1e')]);}_0xa1d8db[_0xfd89('0x37')]=qs[_0xfd89('0x38')](_0x383dba[_0xfd89('0x2f')][_0xfd89('0x38')]);_0xa1d8db[_0xfd89('0x39')]=qs[_0xfd89('0x30')](_[_0xfd89('0x3a')](_0x383dba[_0xfd89('0x2f')],_0x278d3a[_0xfd89('0x30')]),_0x3b2274);if(_0x383dba[_0xfd89('0x2f')]['filter']){_0xa1d8db[_0xfd89('0x39')]=_[_0xfd89('0x3b')](_0xa1d8db['where'],{'$or':_[_0xfd89('0x2a')](_0x3b2274,function(_0x4aead3){if(_0x4aead3['type']!==_0xfd89('0x3c')){var _0x552a6f={};_0x552a6f[_0x4aead3[_0xfd89('0x28')]]={'$like':'%'+_0x383dba[_0xfd89('0x2f')][_0xfd89('0x3d')]+'%'};return _0x552a6f;}})});}_0xa1d8db=_['merge']({},_0xa1d8db,_0x383dba[_0xfd89('0x3e')]);var _0x432898={'where':_0xa1d8db['where']};return db[_0xfd89('0x2b')]['count'](_0x432898)['then'](function(_0x5998e3){_0x1befb7[_0xfd89('0x21')]=_0x5998e3;if(_0x383dba[_0xfd89('0x2f')][_0xfd89('0x3f')]){_0xa1d8db['include']=[{'all':!![]}];}return db[_0xfd89('0x2b')][_0xfd89('0x40')](_0xa1d8db);})[_0xfd89('0x25')](function(_0x537f58){_0x1befb7[_0xfd89('0x41')]=_0x537f58;return _0x1befb7;})[_0xfd89('0x25')](respondWithFilteredResult(_0xe4d5c2,_0xa1d8db))[_0xfd89('0x42')](handleError(_0xe4d5c2,null));};exports[_0xfd89('0x43')]=function(_0xf5dcfc,_0x406309){var _0x12af05={'raw':![],'where':{'id':_0xf5dcfc[_0xfd89('0x44')]['id']}},_0x28dd79={};_0x28dd79[_0xfd89('0x2e')]=_[_0xfd89('0x45')](db['IntegrationReport'][_0xfd89('0x46')]);_0x28dd79[_0xfd89('0x2f')]=_[_0xfd89('0x45')](_0xf5dcfc[_0xfd89('0x2f')]);_0x28dd79['filters']=_[_0xfd89('0x31')](_0x28dd79[_0xfd89('0x2e')],_0x28dd79[_0xfd89('0x2f')]);_0x12af05[_0xfd89('0x32')]=_[_0xfd89('0x31')](_0x28dd79[_0xfd89('0x2e')],qs['fields'](_0xf5dcfc[_0xfd89('0x2f')][_0xfd89('0x33')]));_0x12af05[_0xfd89('0x32')]=_0x12af05[_0xfd89('0x32')][_0xfd89('0x34')]?_0x12af05[_0xfd89('0x32')]:_0x28dd79[_0xfd89('0x2e')];if(_0xf5dcfc[_0xfd89('0x2f')][_0xfd89('0x3f')]){_0x12af05[_0xfd89('0x47')]=[{'all':!![]}];}_0x12af05=_['merge']({},_0x12af05,_0xf5dcfc[_0xfd89('0x3e')]);return db[_0xfd89('0x2b')][_0xfd89('0x48')](_0x12af05)[_0xfd89('0x25')](handleEntityNotFound(_0x406309,null))['then'](respondWithResult(_0x406309,null))[_0xfd89('0x42')](handleError(_0x406309,null));};exports[_0xfd89('0x49')]=function(_0x5cde6a,_0x1442b0){return db['IntegrationReport'][_0xfd89('0x49')](_0x5cde6a[_0xfd89('0x4a')],{})[_0xfd89('0x25')](respondWithResult(_0x1442b0,0xc9))[_0xfd89('0x42')](handleError(_0x1442b0,null));};exports['update']=function(_0x29e359,_0x54ede4){if(_0x29e359[_0xfd89('0x4a')]['id']){delete _0x29e359['body']['id'];}return db[_0xfd89('0x2b')][_0xfd89('0x48')]({'where':{'id':_0x29e359[_0xfd89('0x44')]['id']}})['then'](handleEntityNotFound(_0x54ede4,null))[_0xfd89('0x25')](saveUpdates(_0x29e359[_0xfd89('0x4a')],null))[_0xfd89('0x25')](respondWithResult(_0x54ede4,null))[_0xfd89('0x42')](handleError(_0x54ede4,null));};exports[_0xfd89('0x4b')]=function(_0x728589,_0x2c8c23){return db[_0xfd89('0x2b')][_0xfd89('0x48')]({'where':{'id':_0x728589['params']['id']}})['then'](handleEntityNotFound(_0x2c8c23,null))[_0xfd89('0x25')](removeEntity(_0x2c8c23,null))['catch'](handleError(_0x2c8c23,null));};exports[_0xfd89('0x4c')]=function(_0x575c6e,_0x698e4e){return db[_0xfd89('0x2b')][_0xfd89('0x4c')]()[_0xfd89('0x25')](respondWithResult(_0x698e4e,null))[_0xfd89('0x42')](handleError(_0x698e4e,null));};
\ No newline at end of file