Built motion from commit 47436d59.|2.6.7
[motion2.git] / server / api / intFreshsalesField / intFreshsalesField.controller.js
index 3e8182e..13025ed 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9abd=['show','params','rawAttributes','length','create','body','destroy','find','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','then','error','stack','name','index','map','FreshsalesField','fieldName','type','model','query','keys','intersection','fields','attributes','nolimit','order','sort','where','filters','pick','filter','merge','options','includeAll','include','findAll','rows','catch'];(function(_0x4edb28,_0x1f0292){var _0x5b56c0=function(_0x38e742){while(--_0x38e742){_0x4edb28['push'](_0x4edb28['shift']());}};_0x5b56c0(++_0x1f0292);}(_0x9abd,0x1c4));var _0xd9ab=function(_0x579ca9,_0x154453){_0x579ca9=_0x579ca9-0x0;var _0x1a25de=_0x9abd[_0x579ca9];return _0x1a25de;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xd9ab('0x0'));var zipdir=require(_0xd9ab('0x1'));var jsonpatch=require(_0xd9ab('0x2'));var rp=require('request-promise');var moment=require(_0xd9ab('0x3'));var BPromise=require(_0xd9ab('0x4'));var Mustache=require(_0xd9ab('0x5'));var util=require(_0xd9ab('0x6'));var path=require('path');var sox=require(_0xd9ab('0x7'));var csv=require(_0xd9ab('0x8'));var ejs=require(_0xd9ab('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xd9ab('0xa'));var squel=require(_0xd9ab('0xb'));var crypto=require(_0xd9ab('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xd9ab('0xd'));var toCsv=require(_0xd9ab('0x8'));var querystring=require(_0xd9ab('0xe'));var Papa=require('papaparse');var Redis=require(_0xd9ab('0xf'));var authService=require(_0xd9ab('0x10'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xd9ab('0x11'));var logger=require(_0xd9ab('0x12'))(_0xd9ab('0x13'));var utils=require('../../config/utils');var config=require(_0xd9ab('0x14'));var licenseUtil=require(_0xd9ab('0x15'));var db=require(_0xd9ab('0x16'))['db'];function respondWithStatusCode(_0x11409f,_0x467205){_0x467205=_0x467205||0xcc;return function(_0x52f37b){if(_0x52f37b){return _0x11409f[_0xd9ab('0x17')](_0x467205);}return _0x11409f[_0xd9ab('0x18')](_0x467205)[_0xd9ab('0x19')]();};}function respondWithResult(_0x361414,_0x2ab29f){_0x2ab29f=_0x2ab29f||0xc8;return function(_0x147d36){if(_0x147d36){return _0x361414[_0xd9ab('0x18')](_0x2ab29f)[_0xd9ab('0x1a')](_0x147d36);}};}function respondWithFilteredResult(_0x128f0b,_0x526e8e){return function(_0x2779af){if(_0x2779af){var _0x238edc=typeof _0x526e8e[_0xd9ab('0x1b')]==='undefined'&&typeof _0x526e8e[_0xd9ab('0x1c')]===_0xd9ab('0x1d');var _0x1e23ce=_0x2779af['count'];var _0x48c29e=_0x238edc?0x0:_0x526e8e[_0xd9ab('0x1b')];var _0x2cef36=_0x238edc?_0x2779af[_0xd9ab('0x1e')]:_0x526e8e['offset']+_0x526e8e[_0xd9ab('0x1c')];var _0x40a558;if(_0x2cef36>=_0x1e23ce){_0x2cef36=_0x1e23ce;_0x40a558=0xc8;}else{_0x40a558=0xce;}_0x128f0b[_0xd9ab('0x18')](_0x40a558);return _0x128f0b[_0xd9ab('0x1f')](_0xd9ab('0x20'),_0x48c29e+'-'+_0x2cef36+'/'+_0x1e23ce)['json'](_0x2779af);}return null;};}function patchUpdates(_0x3aa599){return function(_0x44dde0){try{jsonpatch[_0xd9ab('0x21')](_0x44dde0,_0x3aa599,!![]);}catch(_0x2a3520){return BPromise[_0xd9ab('0x22')](_0x2a3520);}return _0x44dde0[_0xd9ab('0x23')]();};}function saveUpdates(_0x13eff2,_0x437afc){return function(_0x58428a){if(_0x58428a){return _0x58428a[_0xd9ab('0x24')](_0x13eff2)['then'](function(_0x46f58b){return _0x46f58b;});}return null;};}function removeEntity(_0x140c4a,_0x119b0d){return function(_0x24e5ff){if(_0x24e5ff){return _0x24e5ff['destroy']()[_0xd9ab('0x25')](function(){_0x140c4a[_0xd9ab('0x18')](0xcc)[_0xd9ab('0x19')]();});}};}function handleEntityNotFound(_0xfd3810,_0x14624d){return function(_0x5b0fba){if(!_0x5b0fba){_0xfd3810['sendStatus'](0x194);}return _0x5b0fba;};}function handleError(_0x29851c,_0xf77ce7){_0xf77ce7=_0xf77ce7||0x1f4;return function(_0x1431e3){logger[_0xd9ab('0x26')](_0x1431e3[_0xd9ab('0x27')]);if(_0x1431e3[_0xd9ab('0x28')]){delete _0x1431e3[_0xd9ab('0x28')];}_0x29851c[_0xd9ab('0x18')](_0xf77ce7)['send'](_0x1431e3);};}exports[_0xd9ab('0x29')]=function(_0x82743b,_0x217850){var _0x4e3403={},_0x5f4eaf={},_0x3fc12a={'count':0x0,'rows':[]};var _0x137315=_[_0xd9ab('0x2a')](db[_0xd9ab('0x2b')]['rawAttributes'],function(_0x489bdc){return{'name':_0x489bdc[_0xd9ab('0x2c')],'type':_0x489bdc[_0xd9ab('0x2d')]['key']};});_0x5f4eaf[_0xd9ab('0x2e')]=_[_0xd9ab('0x2a')](_0x137315,_0xd9ab('0x28'));_0x5f4eaf[_0xd9ab('0x2f')]=_[_0xd9ab('0x30')](_0x82743b['query']);_0x5f4eaf['filters']=_['intersection'](_0x5f4eaf['model'],_0x5f4eaf[_0xd9ab('0x2f')]);_0x4e3403['attributes']=_[_0xd9ab('0x31')](_0x5f4eaf[_0xd9ab('0x2e')],qs[_0xd9ab('0x32')](_0x82743b[_0xd9ab('0x2f')][_0xd9ab('0x32')]));_0x4e3403[_0xd9ab('0x33')]=_0x4e3403['attributes']['length']?_0x4e3403['attributes']:_0x5f4eaf[_0xd9ab('0x2e')];if(!_0x82743b[_0xd9ab('0x2f')]['hasOwnProperty'](_0xd9ab('0x34'))){_0x4e3403[_0xd9ab('0x1c')]=qs[_0xd9ab('0x1c')](_0x82743b[_0xd9ab('0x2f')][_0xd9ab('0x1c')]);_0x4e3403[_0xd9ab('0x1b')]=qs[_0xd9ab('0x1b')](_0x82743b[_0xd9ab('0x2f')][_0xd9ab('0x1b')]);}_0x4e3403[_0xd9ab('0x35')]=qs[_0xd9ab('0x36')](_0x82743b[_0xd9ab('0x2f')][_0xd9ab('0x36')]);_0x4e3403[_0xd9ab('0x37')]=qs[_0xd9ab('0x38')](_[_0xd9ab('0x39')](_0x82743b[_0xd9ab('0x2f')],_0x5f4eaf[_0xd9ab('0x38')]),_0x137315);if(_0x82743b[_0xd9ab('0x2f')][_0xd9ab('0x3a')]){_0x4e3403[_0xd9ab('0x37')]=_[_0xd9ab('0x3b')](_0x4e3403[_0xd9ab('0x37')],{'$or':_[_0xd9ab('0x2a')](_0x137315,function(_0x50a44b){if(_0x50a44b['type']!=='VIRTUAL'){var _0x5e9c39={};_0x5e9c39[_0x50a44b[_0xd9ab('0x28')]]={'$like':'%'+_0x82743b[_0xd9ab('0x2f')][_0xd9ab('0x3a')]+'%'};return _0x5e9c39;}})});}_0x4e3403=_[_0xd9ab('0x3b')]({},_0x4e3403,_0x82743b[_0xd9ab('0x3c')]);var _0x5a50b5={'where':_0x4e3403['where']};return db[_0xd9ab('0x2b')]['count'](_0x5a50b5)[_0xd9ab('0x25')](function(_0x470a34){_0x3fc12a[_0xd9ab('0x1e')]=_0x470a34;if(_0x82743b[_0xd9ab('0x2f')][_0xd9ab('0x3d')]){_0x4e3403[_0xd9ab('0x3e')]=[{'all':!![]}];}return db['FreshsalesField'][_0xd9ab('0x3f')](_0x4e3403);})[_0xd9ab('0x25')](function(_0x5101cc){_0x3fc12a[_0xd9ab('0x40')]=_0x5101cc;return _0x3fc12a;})[_0xd9ab('0x25')](respondWithFilteredResult(_0x217850,_0x4e3403))[_0xd9ab('0x41')](handleError(_0x217850,null));};exports[_0xd9ab('0x42')]=function(_0x500abe,_0x3e4438){var _0x4d4524={'raw':!![],'where':{'id':_0x500abe[_0xd9ab('0x43')]['id']}},_0x217452={};_0x217452[_0xd9ab('0x2e')]=_[_0xd9ab('0x30')](db['FreshsalesField'][_0xd9ab('0x44')]);_0x217452[_0xd9ab('0x2f')]=_[_0xd9ab('0x30')](_0x500abe['query']);_0x217452[_0xd9ab('0x38')]=_[_0xd9ab('0x31')](_0x217452[_0xd9ab('0x2e')],_0x217452[_0xd9ab('0x2f')]);_0x4d4524[_0xd9ab('0x33')]=_[_0xd9ab('0x31')](_0x217452[_0xd9ab('0x2e')],qs['fields'](_0x500abe['query'][_0xd9ab('0x32')]));_0x4d4524[_0xd9ab('0x33')]=_0x4d4524[_0xd9ab('0x33')][_0xd9ab('0x45')]?_0x4d4524[_0xd9ab('0x33')]:_0x217452['model'];if(_0x500abe[_0xd9ab('0x2f')][_0xd9ab('0x3d')]){_0x4d4524[_0xd9ab('0x3e')]=[{'all':!![]}];}_0x4d4524=_[_0xd9ab('0x3b')]({},_0x4d4524,_0x500abe[_0xd9ab('0x3c')]);return db[_0xd9ab('0x2b')]['find'](_0x4d4524)[_0xd9ab('0x25')](handleEntityNotFound(_0x3e4438,null))[_0xd9ab('0x25')](respondWithResult(_0x3e4438,null))[_0xd9ab('0x41')](handleError(_0x3e4438,null));};exports[_0xd9ab('0x46')]=function(_0xf46cac,_0x3c3498){return db[_0xd9ab('0x2b')]['create'](_0xf46cac['body'],{})[_0xd9ab('0x25')](respondWithResult(_0x3c3498,0xc9))[_0xd9ab('0x41')](handleError(_0x3c3498,null));};exports['update']=function(_0x323ab7,_0x20c36b){if(_0x323ab7[_0xd9ab('0x47')]['id']){delete _0x323ab7[_0xd9ab('0x47')]['id'];}return db[_0xd9ab('0x2b')]['find']({'where':{'id':_0x323ab7['params']['id']}})['then'](handleEntityNotFound(_0x20c36b,null))['then'](saveUpdates(_0x323ab7[_0xd9ab('0x47')],null))[_0xd9ab('0x25')](respondWithResult(_0x20c36b,null))[_0xd9ab('0x41')](handleError(_0x20c36b,null));};exports[_0xd9ab('0x48')]=function(_0x2fa7e4,_0x432f90){return db[_0xd9ab('0x2b')][_0xd9ab('0x49')]({'where':{'id':_0x2fa7e4[_0xd9ab('0x43')]['id']}})[_0xd9ab('0x25')](handleEntityNotFound(_0x432f90,null))[_0xd9ab('0x25')](removeEntity(_0x432f90,null))[_0xd9ab('0x41')](handleError(_0x432f90,null));};
\ No newline at end of file
+var _0x3f7d=['include','rows','catch','show','rawAttributes','length','find','create','body','params','eml-format','rimraf','zip-dir','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','crypto','jsforce','desk.js','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','json','apply','reject','save','then','error','stack','name','index','map','FreshsalesField','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','sort','where','pick','filter','merge','options','includeAll'];(function(_0x2b92c1,_0x332fc1){var _0x20a9b6=function(_0x2c3a0c){while(--_0x2c3a0c){_0x2b92c1['push'](_0x2b92c1['shift']());}};_0x20a9b6(++_0x332fc1);}(_0x3f7d,0xdf));var _0xd3f7=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x3f7d[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0xd3f7('0x0'));var rimraf=require(_0xd3f7('0x1'));var zipdir=require(_0xd3f7('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xd3f7('0x3'));var BPromise=require(_0xd3f7('0x4'));var Mustache=require(_0xd3f7('0x5'));var util=require(_0xd3f7('0x6'));var path=require(_0xd3f7('0x7'));var sox=require(_0xd3f7('0x8'));var csv=require(_0xd3f7('0x9'));var ejs=require(_0xd3f7('0xa'));var fs=require('fs');var fs_extra=require(_0xd3f7('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xd3f7('0xc'));var jsforce=require(_0xd3f7('0xd'));var deskjs=require(_0xd3f7('0xe'));var toCsv=require(_0xd3f7('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xd3f7('0xf'));var as=require(_0xd3f7('0x10'));var hardwareService=require(_0xd3f7('0x11'));var logger=require(_0xd3f7('0x12'))(_0xd3f7('0x13'));var utils=require(_0xd3f7('0x14'));var config=require(_0xd3f7('0x15'));var licenseUtil=require(_0xd3f7('0x16'));var db=require(_0xd3f7('0x17'))['db'];function respondWithStatusCode(_0xbd2f41,_0x204f93){_0x204f93=_0x204f93||0xcc;return function(_0x54ab2a){if(_0x54ab2a){return _0xbd2f41[_0xd3f7('0x18')](_0x204f93);}return _0xbd2f41[_0xd3f7('0x19')](_0x204f93)[_0xd3f7('0x1a')]();};}function respondWithResult(_0x5cf6ab,_0x366538){_0x366538=_0x366538||0xc8;return function(_0x16b895){if(_0x16b895){return _0x5cf6ab[_0xd3f7('0x19')](_0x366538)['json'](_0x16b895);}};}function respondWithFilteredResult(_0x4374e7,_0x4005eb){return function(_0x2a57cb){if(_0x2a57cb){var _0x3396da=typeof _0x4005eb[_0xd3f7('0x1b')]===_0xd3f7('0x1c')&&typeof _0x4005eb[_0xd3f7('0x1d')]==='undefined';var _0x2487cc=_0x2a57cb[_0xd3f7('0x1e')];var _0x5a6568=_0x3396da?0x0:_0x4005eb['offset'];var _0x2414b8=_0x3396da?_0x2a57cb[_0xd3f7('0x1e')]:_0x4005eb[_0xd3f7('0x1b')]+_0x4005eb[_0xd3f7('0x1d')];var _0x43b870;if(_0x2414b8>=_0x2487cc){_0x2414b8=_0x2487cc;_0x43b870=0xc8;}else{_0x43b870=0xce;}_0x4374e7[_0xd3f7('0x19')](_0x43b870);return _0x4374e7[_0xd3f7('0x1f')]('Content-Range',_0x5a6568+'-'+_0x2414b8+'/'+_0x2487cc)[_0xd3f7('0x20')](_0x2a57cb);}return null;};}function patchUpdates(_0x2d4aa5){return function(_0xf59223){try{jsonpatch[_0xd3f7('0x21')](_0xf59223,_0x2d4aa5,!![]);}catch(_0x1eac04){return BPromise[_0xd3f7('0x22')](_0x1eac04);}return _0xf59223[_0xd3f7('0x23')]();};}function saveUpdates(_0x27eaf1,_0x94b615){return function(_0x2ac951){if(_0x2ac951){return _0x2ac951['update'](_0x27eaf1)['then'](function(_0x186bf7){return _0x186bf7;});}return null;};}function removeEntity(_0x1a0c64,_0x29ffdb){return function(_0xb5983e){if(_0xb5983e){return _0xb5983e['destroy']()[_0xd3f7('0x24')](function(){_0x1a0c64['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x5071ce,_0x1aaaf5){return function(_0x282df5){if(!_0x282df5){_0x5071ce['sendStatus'](0x194);}return _0x282df5;};}function handleError(_0x4915cb,_0x133f02){_0x133f02=_0x133f02||0x1f4;return function(_0x32bcdc){logger[_0xd3f7('0x25')](_0x32bcdc[_0xd3f7('0x26')]);if(_0x32bcdc[_0xd3f7('0x27')]){delete _0x32bcdc[_0xd3f7('0x27')];}_0x4915cb[_0xd3f7('0x19')](_0x133f02)['send'](_0x32bcdc);};}exports[_0xd3f7('0x28')]=function(_0x581617,_0x1faff6){var _0x20a206={},_0x5c2a01={},_0x15055d={'count':0x0,'rows':[]};var _0x55a41e=_[_0xd3f7('0x29')](db[_0xd3f7('0x2a')]['rawAttributes'],function(_0x1f3fe5){return{'name':_0x1f3fe5[_0xd3f7('0x2b')],'type':_0x1f3fe5[_0xd3f7('0x2c')][_0xd3f7('0x2d')]};});_0x5c2a01[_0xd3f7('0x2e')]=_['map'](_0x55a41e,_0xd3f7('0x27'));_0x5c2a01[_0xd3f7('0x2f')]=_[_0xd3f7('0x30')](_0x581617[_0xd3f7('0x2f')]);_0x5c2a01[_0xd3f7('0x31')]=_[_0xd3f7('0x32')](_0x5c2a01[_0xd3f7('0x2e')],_0x5c2a01[_0xd3f7('0x2f')]);_0x20a206[_0xd3f7('0x33')]=_[_0xd3f7('0x32')](_0x5c2a01[_0xd3f7('0x2e')],qs['fields'](_0x581617[_0xd3f7('0x2f')][_0xd3f7('0x34')]));_0x20a206[_0xd3f7('0x33')]=_0x20a206[_0xd3f7('0x33')]['length']?_0x20a206[_0xd3f7('0x33')]:_0x5c2a01[_0xd3f7('0x2e')];if(!_0x581617[_0xd3f7('0x2f')][_0xd3f7('0x35')]('nolimit')){_0x20a206['limit']=qs[_0xd3f7('0x1d')](_0x581617[_0xd3f7('0x2f')]['limit']);_0x20a206[_0xd3f7('0x1b')]=qs[_0xd3f7('0x1b')](_0x581617['query']['offset']);}_0x20a206['order']=qs[_0xd3f7('0x36')](_0x581617[_0xd3f7('0x2f')]['sort']);_0x20a206[_0xd3f7('0x37')]=qs[_0xd3f7('0x31')](_[_0xd3f7('0x38')](_0x581617[_0xd3f7('0x2f')],_0x5c2a01[_0xd3f7('0x31')]),_0x55a41e);if(_0x581617['query'][_0xd3f7('0x39')]){_0x20a206[_0xd3f7('0x37')]=_[_0xd3f7('0x3a')](_0x20a206['where'],{'$or':_[_0xd3f7('0x29')](_0x55a41e,function(_0x1c2d75){if(_0x1c2d75[_0xd3f7('0x2c')]!=='VIRTUAL'){var _0x3c4d66={};_0x3c4d66[_0x1c2d75['name']]={'$like':'%'+_0x581617['query'][_0xd3f7('0x39')]+'%'};return _0x3c4d66;}})});}_0x20a206=_[_0xd3f7('0x3a')]({},_0x20a206,_0x581617[_0xd3f7('0x3b')]);var _0x1b836d={'where':_0x20a206[_0xd3f7('0x37')]};return db[_0xd3f7('0x2a')][_0xd3f7('0x1e')](_0x1b836d)[_0xd3f7('0x24')](function(_0x5a6b78){_0x15055d[_0xd3f7('0x1e')]=_0x5a6b78;if(_0x581617[_0xd3f7('0x2f')][_0xd3f7('0x3c')]){_0x20a206[_0xd3f7('0x3d')]=[{'all':!![]}];}return db[_0xd3f7('0x2a')]['findAll'](_0x20a206);})[_0xd3f7('0x24')](function(_0x35d2a1){_0x15055d[_0xd3f7('0x3e')]=_0x35d2a1;return _0x15055d;})[_0xd3f7('0x24')](respondWithFilteredResult(_0x1faff6,_0x20a206))[_0xd3f7('0x3f')](handleError(_0x1faff6,null));};exports[_0xd3f7('0x40')]=function(_0x567b63,_0x339bcf){var _0x4fafa3={'raw':!![],'where':{'id':_0x567b63['params']['id']}},_0x3523d2={};_0x3523d2[_0xd3f7('0x2e')]=_[_0xd3f7('0x30')](db[_0xd3f7('0x2a')][_0xd3f7('0x41')]);_0x3523d2['query']=_[_0xd3f7('0x30')](_0x567b63[_0xd3f7('0x2f')]);_0x3523d2[_0xd3f7('0x31')]=_[_0xd3f7('0x32')](_0x3523d2[_0xd3f7('0x2e')],_0x3523d2[_0xd3f7('0x2f')]);_0x4fafa3['attributes']=_[_0xd3f7('0x32')](_0x3523d2['model'],qs[_0xd3f7('0x34')](_0x567b63[_0xd3f7('0x2f')][_0xd3f7('0x34')]));_0x4fafa3[_0xd3f7('0x33')]=_0x4fafa3[_0xd3f7('0x33')][_0xd3f7('0x42')]?_0x4fafa3['attributes']:_0x3523d2['model'];if(_0x567b63[_0xd3f7('0x2f')][_0xd3f7('0x3c')]){_0x4fafa3[_0xd3f7('0x3d')]=[{'all':!![]}];}_0x4fafa3=_[_0xd3f7('0x3a')]({},_0x4fafa3,_0x567b63[_0xd3f7('0x3b')]);return db['FreshsalesField'][_0xd3f7('0x43')](_0x4fafa3)[_0xd3f7('0x24')](handleEntityNotFound(_0x339bcf,null))[_0xd3f7('0x24')](respondWithResult(_0x339bcf,null))['catch'](handleError(_0x339bcf,null));};exports[_0xd3f7('0x44')]=function(_0xd75ffa,_0x5e71fd){return db[_0xd3f7('0x2a')][_0xd3f7('0x44')](_0xd75ffa['body'],{})[_0xd3f7('0x24')](respondWithResult(_0x5e71fd,0xc9))['catch'](handleError(_0x5e71fd,null));};exports['update']=function(_0x40919,_0x173072){if(_0x40919[_0xd3f7('0x45')]['id']){delete _0x40919[_0xd3f7('0x45')]['id'];}return db[_0xd3f7('0x2a')][_0xd3f7('0x43')]({'where':{'id':_0x40919[_0xd3f7('0x46')]['id']}})['then'](handleEntityNotFound(_0x173072,null))[_0xd3f7('0x24')](saveUpdates(_0x40919['body'],null))[_0xd3f7('0x24')](respondWithResult(_0x173072,null))[_0xd3f7('0x3f')](handleError(_0x173072,null));};exports['destroy']=function(_0x2456a8,_0x2bef1a){return db[_0xd3f7('0x2a')][_0xd3f7('0x43')]({'where':{'id':_0x2456a8[_0xd3f7('0x46')]['id']}})[_0xd3f7('0x24')](handleEntityNotFound(_0x2bef1a,null))[_0xd3f7('0x24')](removeEntity(_0x2bef1a,null))[_0xd3f7('0x3f')](handleError(_0x2bef1a,null));};
\ No newline at end of file