Built motion from commit bab6f49e.|2.6.17
[motion2.git] / server / api / intSalesforceField / intSalesforceField.controller.js
index dbb7956..b27d389 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7f3b=['to-csv','fs-extra','lodash','jsforce','desk.js','querystring','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','undefined','count','limit','set','apply','reject','save','update','then','destroy','stack','name','index','map','SalesforceField','fieldName','key','model','query','filters','attributes','intersection','fields','length','hasOwnProperty','order','sort','where','pick','filter','type','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','show','params','rawAttributes','keys','create','body','find','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','sox'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x7f3b,0x1ae));var _0xb7f3=function(_0x35e50d,_0x224188){_0x35e50d=_0x35e50d-0x0;var _0x40e702=_0x7f3b[_0x35e50d];return _0x40e702;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xb7f3('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xb7f3('0x1'));var rp=require(_0xb7f3('0x2'));var moment=require(_0xb7f3('0x3'));var BPromise=require(_0xb7f3('0x4'));var Mustache=require('mustache');var util=require(_0xb7f3('0x5'));var path=require(_0xb7f3('0x6'));var sox=require(_0xb7f3('0x7'));var csv=require(_0xb7f3('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xb7f3('0x9'));var _=require(_0xb7f3('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xb7f3('0xb'));var deskjs=require(_0xb7f3('0xc'));var toCsv=require(_0xb7f3('0x8'));var querystring=require(_0xb7f3('0xd'));var Papa=require('papaparse');var Redis=require(_0xb7f3('0xe'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xb7f3('0xf'));var hardwareService=require(_0xb7f3('0x10'));var logger=require(_0xb7f3('0x11'))(_0xb7f3('0x12'));var utils=require(_0xb7f3('0x13'));var config=require(_0xb7f3('0x14'));var licenseUtil=require(_0xb7f3('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5d18e8,_0x4c60d8){_0x4c60d8=_0x4c60d8||0xcc;return function(_0x37a9cb){if(_0x37a9cb){return _0x5d18e8[_0xb7f3('0x16')](_0x4c60d8);}return _0x5d18e8[_0xb7f3('0x17')](_0x4c60d8)[_0xb7f3('0x18')]();};}function respondWithResult(_0x161213,_0x3eeac8){_0x3eeac8=_0x3eeac8||0xc8;return function(_0x4af130){if(_0x4af130){return _0x161213[_0xb7f3('0x17')](_0x3eeac8)[_0xb7f3('0x19')](_0x4af130);}};}function respondWithFilteredResult(_0x4c9b48,_0x45acc0){return function(_0x2f0d6f){if(_0x2f0d6f){var _0xc7ff9a=typeof _0x45acc0[_0xb7f3('0x1a')]===_0xb7f3('0x1b')&&typeof _0x45acc0['limit']===_0xb7f3('0x1b');var _0x19d152=_0x2f0d6f['count'];var _0x43ba4b=_0xc7ff9a?0x0:_0x45acc0[_0xb7f3('0x1a')];var _0x4f0b96=_0xc7ff9a?_0x2f0d6f[_0xb7f3('0x1c')]:_0x45acc0[_0xb7f3('0x1a')]+_0x45acc0[_0xb7f3('0x1d')];var _0x3babb8;if(_0x4f0b96>=_0x19d152){_0x4f0b96=_0x19d152;_0x3babb8=0xc8;}else{_0x3babb8=0xce;}_0x4c9b48[_0xb7f3('0x17')](_0x3babb8);return _0x4c9b48[_0xb7f3('0x1e')]('Content-Range',_0x43ba4b+'-'+_0x4f0b96+'/'+_0x19d152)[_0xb7f3('0x19')](_0x2f0d6f);}return null;};}function patchUpdates(_0x3a94ea){return function(_0x515a53){try{jsonpatch[_0xb7f3('0x1f')](_0x515a53,_0x3a94ea,!![]);}catch(_0x522876){return BPromise[_0xb7f3('0x20')](_0x522876);}return _0x515a53[_0xb7f3('0x21')]();};}function saveUpdates(_0x227d86,_0x4cacb5){return function(_0x2c220d){if(_0x2c220d){return _0x2c220d[_0xb7f3('0x22')](_0x227d86)[_0xb7f3('0x23')](function(_0x5e157f){return _0x5e157f;});}return null;};}function removeEntity(_0x36edd8,_0x3e4184){return function(_0x483897){if(_0x483897){return _0x483897[_0xb7f3('0x24')]()[_0xb7f3('0x23')](function(){_0x36edd8[_0xb7f3('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1d9287,_0x40f636){return function(_0x231cba){if(!_0x231cba){_0x1d9287['sendStatus'](0x194);}return _0x231cba;};}function handleError(_0x5a499f,_0x294bd6){_0x294bd6=_0x294bd6||0x1f4;return function(_0x595aeb){logger['error'](_0x595aeb[_0xb7f3('0x25')]);if(_0x595aeb['name']){delete _0x595aeb[_0xb7f3('0x26')];}_0x5a499f[_0xb7f3('0x17')](_0x294bd6)['send'](_0x595aeb);};}exports[_0xb7f3('0x27')]=function(_0x410e13,_0x4cb69d){var _0x2e14d3={},_0x58e97b={},_0x26b53a={'count':0x0,'rows':[]};var _0x2e0921=_[_0xb7f3('0x28')](db[_0xb7f3('0x29')]['rawAttributes'],function(_0x552d41){return{'name':_0x552d41[_0xb7f3('0x2a')],'type':_0x552d41['type'][_0xb7f3('0x2b')]};});_0x58e97b[_0xb7f3('0x2c')]=_[_0xb7f3('0x28')](_0x2e0921,_0xb7f3('0x26'));_0x58e97b[_0xb7f3('0x2d')]=_['keys'](_0x410e13[_0xb7f3('0x2d')]);_0x58e97b[_0xb7f3('0x2e')]=_['intersection'](_0x58e97b[_0xb7f3('0x2c')],_0x58e97b[_0xb7f3('0x2d')]);_0x2e14d3[_0xb7f3('0x2f')]=_[_0xb7f3('0x30')](_0x58e97b[_0xb7f3('0x2c')],qs[_0xb7f3('0x31')](_0x410e13[_0xb7f3('0x2d')][_0xb7f3('0x31')]));_0x2e14d3[_0xb7f3('0x2f')]=_0x2e14d3[_0xb7f3('0x2f')][_0xb7f3('0x32')]?_0x2e14d3[_0xb7f3('0x2f')]:_0x58e97b['model'];if(!_0x410e13[_0xb7f3('0x2d')][_0xb7f3('0x33')]('nolimit')){_0x2e14d3['limit']=qs['limit'](_0x410e13[_0xb7f3('0x2d')][_0xb7f3('0x1d')]);_0x2e14d3[_0xb7f3('0x1a')]=qs[_0xb7f3('0x1a')](_0x410e13[_0xb7f3('0x2d')][_0xb7f3('0x1a')]);}_0x2e14d3[_0xb7f3('0x34')]=qs[_0xb7f3('0x35')](_0x410e13['query'][_0xb7f3('0x35')]);_0x2e14d3[_0xb7f3('0x36')]=qs[_0xb7f3('0x2e')](_[_0xb7f3('0x37')](_0x410e13[_0xb7f3('0x2d')],_0x58e97b[_0xb7f3('0x2e')]),_0x2e0921);if(_0x410e13[_0xb7f3('0x2d')][_0xb7f3('0x38')]){_0x2e14d3[_0xb7f3('0x36')]=_['merge'](_0x2e14d3[_0xb7f3('0x36')],{'$or':_[_0xb7f3('0x28')](_0x2e0921,function(_0x15a5de){if(_0x15a5de[_0xb7f3('0x39')]!==_0xb7f3('0x3a')){var _0x31f585={};_0x31f585[_0x15a5de[_0xb7f3('0x26')]]={'$like':'%'+_0x410e13[_0xb7f3('0x2d')][_0xb7f3('0x38')]+'%'};return _0x31f585;}})});}_0x2e14d3=_[_0xb7f3('0x3b')]({},_0x2e14d3,_0x410e13[_0xb7f3('0x3c')]);var _0x110e84={'where':_0x2e14d3[_0xb7f3('0x36')]};return db['SalesforceField']['count'](_0x110e84)['then'](function(_0x542849){_0x26b53a[_0xb7f3('0x1c')]=_0x542849;if(_0x410e13[_0xb7f3('0x2d')][_0xb7f3('0x3d')]){_0x2e14d3[_0xb7f3('0x3e')]=[{'all':!![]}];}return db[_0xb7f3('0x29')][_0xb7f3('0x3f')](_0x2e14d3);})[_0xb7f3('0x23')](function(_0x4daea2){_0x26b53a[_0xb7f3('0x40')]=_0x4daea2;return _0x26b53a;})[_0xb7f3('0x23')](respondWithFilteredResult(_0x4cb69d,_0x2e14d3))[_0xb7f3('0x41')](handleError(_0x4cb69d,null));};exports[_0xb7f3('0x42')]=function(_0x12c716,_0x59cf95){var _0x2cc37b={'raw':!![],'where':{'id':_0x12c716[_0xb7f3('0x43')]['id']}},_0x3b46e1={};_0x3b46e1[_0xb7f3('0x2c')]=_['keys'](db[_0xb7f3('0x29')][_0xb7f3('0x44')]);_0x3b46e1[_0xb7f3('0x2d')]=_[_0xb7f3('0x45')](_0x12c716[_0xb7f3('0x2d')]);_0x3b46e1[_0xb7f3('0x2e')]=_['intersection'](_0x3b46e1[_0xb7f3('0x2c')],_0x3b46e1[_0xb7f3('0x2d')]);_0x2cc37b[_0xb7f3('0x2f')]=_[_0xb7f3('0x30')](_0x3b46e1['model'],qs[_0xb7f3('0x31')](_0x12c716[_0xb7f3('0x2d')][_0xb7f3('0x31')]));_0x2cc37b[_0xb7f3('0x2f')]=_0x2cc37b[_0xb7f3('0x2f')][_0xb7f3('0x32')]?_0x2cc37b[_0xb7f3('0x2f')]:_0x3b46e1[_0xb7f3('0x2c')];if(_0x12c716['query']['includeAll']){_0x2cc37b[_0xb7f3('0x3e')]=[{'all':!![]}];}_0x2cc37b=_[_0xb7f3('0x3b')]({},_0x2cc37b,_0x12c716['options']);return db['SalesforceField']['find'](_0x2cc37b)[_0xb7f3('0x23')](handleEntityNotFound(_0x59cf95,null))[_0xb7f3('0x23')](respondWithResult(_0x59cf95,null))[_0xb7f3('0x41')](handleError(_0x59cf95,null));};exports[_0xb7f3('0x46')]=function(_0x348ea3,_0x31aea0){return db[_0xb7f3('0x29')][_0xb7f3('0x46')](_0x348ea3[_0xb7f3('0x47')],{})[_0xb7f3('0x23')](respondWithResult(_0x31aea0,0xc9))[_0xb7f3('0x41')](handleError(_0x31aea0,null));};exports[_0xb7f3('0x22')]=function(_0x4c3422,_0x2fcfec){if(_0x4c3422[_0xb7f3('0x47')]['id']){delete _0x4c3422[_0xb7f3('0x47')]['id'];}return db[_0xb7f3('0x29')][_0xb7f3('0x48')]({'where':{'id':_0x4c3422['params']['id']}})[_0xb7f3('0x23')](handleEntityNotFound(_0x2fcfec,null))[_0xb7f3('0x23')](saveUpdates(_0x4c3422[_0xb7f3('0x47')],null))['then'](respondWithResult(_0x2fcfec,null))[_0xb7f3('0x41')](handleError(_0x2fcfec,null));};exports[_0xb7f3('0x24')]=function(_0x4d405f,_0x5d3725){return db[_0xb7f3('0x29')]['find']({'where':{'id':_0x4d405f[_0xb7f3('0x43')]['id']}})['then'](handleEntityNotFound(_0x5d3725,null))[_0xb7f3('0x23')](removeEntity(_0x5d3725,null))[_0xb7f3('0x41')](handleError(_0x5d3725,null));};
\ No newline at end of file
+var _0xaac4=['json','offset','undefined','limit','count','set','Content-Range','apply','save','update','then','destroy','error','name','send','map','SalesforceField','rawAttributes','model','keys','filters','intersection','query','attributes','fields','length','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','find','create','body','params','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end'];(function(_0x28edda,_0xbd447a){var _0x21f4a4=function(_0x5ae05e){while(--_0x5ae05e){_0x28edda['push'](_0x28edda['shift']());}};_0x21f4a4(++_0xbd447a);}(_0xaac4,0x112));var _0x4aac=function(_0x409f3f,_0x476945){_0x409f3f=_0x409f3f-0x0;var _0x5753c8=_0xaac4[_0x409f3f];return _0x5753c8;};'use strict';var emlformat=require(_0x4aac('0x0'));var rimraf=require(_0x4aac('0x1'));var zipdir=require(_0x4aac('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4aac('0x3'));var moment=require(_0x4aac('0x4'));var BPromise=require(_0x4aac('0x5'));var Mustache=require(_0x4aac('0x6'));var util=require(_0x4aac('0x7'));var path=require(_0x4aac('0x8'));var sox=require(_0x4aac('0x9'));var csv=require(_0x4aac('0xa'));var ejs=require(_0x4aac('0xb'));var fs=require('fs');var fs_extra=require(_0x4aac('0xc'));var _=require(_0x4aac('0xd'));var squel=require('squel');var crypto=require(_0x4aac('0xe'));var jsforce=require(_0x4aac('0xf'));var deskjs=require(_0x4aac('0x10'));var toCsv=require('to-csv');var querystring=require(_0x4aac('0x11'));var Papa=require(_0x4aac('0x12'));var Redis=require(_0x4aac('0x13'));var authService=require(_0x4aac('0x14'));var qs=require('../../components/parsers/qs');var as=require(_0x4aac('0x15'));var hardwareService=require(_0x4aac('0x16'));var logger=require('../../config/logger')(_0x4aac('0x17'));var utils=require('../../config/utils');var config=require(_0x4aac('0x18'));var licenseUtil=require(_0x4aac('0x19'));var db=require(_0x4aac('0x1a'))['db'];function respondWithStatusCode(_0x40197c,_0xdc3cf0){_0xdc3cf0=_0xdc3cf0||0xcc;return function(_0x41599d){if(_0x41599d){return _0x40197c[_0x4aac('0x1b')](_0xdc3cf0);}return _0x40197c[_0x4aac('0x1c')](_0xdc3cf0)[_0x4aac('0x1d')]();};}function respondWithResult(_0x5e2da6,_0x322218){_0x322218=_0x322218||0xc8;return function(_0x546cbb){if(_0x546cbb){return _0x5e2da6[_0x4aac('0x1c')](_0x322218)[_0x4aac('0x1e')](_0x546cbb);}};}function respondWithFilteredResult(_0x45475d,_0x53b2eb){return function(_0x21510a){if(_0x21510a){var _0x4b7342=typeof _0x53b2eb[_0x4aac('0x1f')]===_0x4aac('0x20')&&typeof _0x53b2eb[_0x4aac('0x21')]===_0x4aac('0x20');var _0x139960=_0x21510a[_0x4aac('0x22')];var _0x3da4b8=_0x4b7342?0x0:_0x53b2eb[_0x4aac('0x1f')];var _0x70728f=_0x4b7342?_0x21510a[_0x4aac('0x22')]:_0x53b2eb[_0x4aac('0x1f')]+_0x53b2eb[_0x4aac('0x21')];var _0x12524a;if(_0x70728f>=_0x139960){_0x70728f=_0x139960;_0x12524a=0xc8;}else{_0x12524a=0xce;}_0x45475d[_0x4aac('0x1c')](_0x12524a);return _0x45475d[_0x4aac('0x23')](_0x4aac('0x24'),_0x3da4b8+'-'+_0x70728f+'/'+_0x139960)['json'](_0x21510a);}return null;};}function patchUpdates(_0x916e69){return function(_0x3ab5a3){try{jsonpatch[_0x4aac('0x25')](_0x3ab5a3,_0x916e69,!![]);}catch(_0x403610){return BPromise['reject'](_0x403610);}return _0x3ab5a3[_0x4aac('0x26')]();};}function saveUpdates(_0x128309,_0x18cfc6){return function(_0x1cf2de){if(_0x1cf2de){return _0x1cf2de[_0x4aac('0x27')](_0x128309)[_0x4aac('0x28')](function(_0x4f757f){return _0x4f757f;});}return null;};}function removeEntity(_0x4df583,_0x417370){return function(_0x3d4c1f){if(_0x3d4c1f){return _0x3d4c1f[_0x4aac('0x29')]()[_0x4aac('0x28')](function(){_0x4df583['status'](0xcc)[_0x4aac('0x1d')]();});}};}function handleEntityNotFound(_0x1a80d7,_0x3045af){return function(_0x32df8d){if(!_0x32df8d){_0x1a80d7[_0x4aac('0x1b')](0x194);}return _0x32df8d;};}function handleError(_0x28e94b,_0x37b5c7){_0x37b5c7=_0x37b5c7||0x1f4;return function(_0x2d3db2){logger[_0x4aac('0x2a')](_0x2d3db2['stack']);if(_0x2d3db2[_0x4aac('0x2b')]){delete _0x2d3db2['name'];}_0x28e94b[_0x4aac('0x1c')](_0x37b5c7)[_0x4aac('0x2c')](_0x2d3db2);};}exports['index']=function(_0x24e41e,_0x405a1e){var _0x33e45b={},_0x585bfc={},_0x10f611={'count':0x0,'rows':[]};var _0x18b2dc=_[_0x4aac('0x2d')](db[_0x4aac('0x2e')][_0x4aac('0x2f')],function(_0x41ac5b){return{'name':_0x41ac5b['fieldName'],'type':_0x41ac5b['type']['key']};});_0x585bfc[_0x4aac('0x30')]=_['map'](_0x18b2dc,'name');_0x585bfc['query']=_[_0x4aac('0x31')](_0x24e41e['query']);_0x585bfc[_0x4aac('0x32')]=_[_0x4aac('0x33')](_0x585bfc['model'],_0x585bfc[_0x4aac('0x34')]);_0x33e45b[_0x4aac('0x35')]=_[_0x4aac('0x33')](_0x585bfc['model'],qs[_0x4aac('0x36')](_0x24e41e[_0x4aac('0x34')][_0x4aac('0x36')]));_0x33e45b[_0x4aac('0x35')]=_0x33e45b[_0x4aac('0x35')][_0x4aac('0x37')]?_0x33e45b[_0x4aac('0x35')]:_0x585bfc[_0x4aac('0x30')];if(!_0x24e41e[_0x4aac('0x34')]['hasOwnProperty'](_0x4aac('0x38'))){_0x33e45b[_0x4aac('0x21')]=qs[_0x4aac('0x21')](_0x24e41e[_0x4aac('0x34')][_0x4aac('0x21')]);_0x33e45b[_0x4aac('0x1f')]=qs[_0x4aac('0x1f')](_0x24e41e[_0x4aac('0x34')][_0x4aac('0x1f')]);}_0x33e45b[_0x4aac('0x39')]=qs['sort'](_0x24e41e[_0x4aac('0x34')][_0x4aac('0x3a')]);_0x33e45b[_0x4aac('0x3b')]=qs[_0x4aac('0x32')](_[_0x4aac('0x3c')](_0x24e41e['query'],_0x585bfc[_0x4aac('0x32')]),_0x18b2dc);if(_0x24e41e[_0x4aac('0x34')][_0x4aac('0x3d')]){_0x33e45b[_0x4aac('0x3b')]=_[_0x4aac('0x3e')](_0x33e45b['where'],{'$or':_[_0x4aac('0x2d')](_0x18b2dc,function(_0xb0902c){if(_0xb0902c[_0x4aac('0x3f')]!==_0x4aac('0x40')){var _0x14b255={};_0x14b255[_0xb0902c[_0x4aac('0x2b')]]={'$like':'%'+_0x24e41e[_0x4aac('0x34')][_0x4aac('0x3d')]+'%'};return _0x14b255;}})});}_0x33e45b=_[_0x4aac('0x3e')]({},_0x33e45b,_0x24e41e[_0x4aac('0x41')]);var _0x1ce23b={'where':_0x33e45b[_0x4aac('0x3b')]};return db['SalesforceField'][_0x4aac('0x22')](_0x1ce23b)['then'](function(_0x320314){_0x10f611[_0x4aac('0x22')]=_0x320314;if(_0x24e41e[_0x4aac('0x34')][_0x4aac('0x42')]){_0x33e45b[_0x4aac('0x43')]=[{'all':!![]}];}return db[_0x4aac('0x2e')][_0x4aac('0x44')](_0x33e45b);})['then'](function(_0x15e151){_0x10f611[_0x4aac('0x45')]=_0x15e151;return _0x10f611;})[_0x4aac('0x28')](respondWithFilteredResult(_0x405a1e,_0x33e45b))[_0x4aac('0x46')](handleError(_0x405a1e,null));};exports[_0x4aac('0x47')]=function(_0x23bf28,_0x4c62f9){var _0x3144c1={'raw':!![],'where':{'id':_0x23bf28['params']['id']}},_0x27ee64={};_0x27ee64[_0x4aac('0x30')]=_[_0x4aac('0x31')](db[_0x4aac('0x2e')][_0x4aac('0x2f')]);_0x27ee64[_0x4aac('0x34')]=_[_0x4aac('0x31')](_0x23bf28[_0x4aac('0x34')]);_0x27ee64[_0x4aac('0x32')]=_[_0x4aac('0x33')](_0x27ee64[_0x4aac('0x30')],_0x27ee64['query']);_0x3144c1[_0x4aac('0x35')]=_[_0x4aac('0x33')](_0x27ee64['model'],qs['fields'](_0x23bf28['query'][_0x4aac('0x36')]));_0x3144c1[_0x4aac('0x35')]=_0x3144c1[_0x4aac('0x35')][_0x4aac('0x37')]?_0x3144c1[_0x4aac('0x35')]:_0x27ee64[_0x4aac('0x30')];if(_0x23bf28[_0x4aac('0x34')][_0x4aac('0x42')]){_0x3144c1[_0x4aac('0x43')]=[{'all':!![]}];}_0x3144c1=_['merge']({},_0x3144c1,_0x23bf28[_0x4aac('0x41')]);return db[_0x4aac('0x2e')][_0x4aac('0x48')](_0x3144c1)[_0x4aac('0x28')](handleEntityNotFound(_0x4c62f9,null))['then'](respondWithResult(_0x4c62f9,null))[_0x4aac('0x46')](handleError(_0x4c62f9,null));};exports[_0x4aac('0x49')]=function(_0x3a4d5c,_0x121b9b){return db[_0x4aac('0x2e')][_0x4aac('0x49')](_0x3a4d5c['body'],{})['then'](respondWithResult(_0x121b9b,0xc9))[_0x4aac('0x46')](handleError(_0x121b9b,null));};exports[_0x4aac('0x27')]=function(_0x3e81c3,_0x4b5fa1){if(_0x3e81c3[_0x4aac('0x4a')]['id']){delete _0x3e81c3['body']['id'];}return db['SalesforceField'][_0x4aac('0x48')]({'where':{'id':_0x3e81c3[_0x4aac('0x4b')]['id']}})['then'](handleEntityNotFound(_0x4b5fa1,null))['then'](saveUpdates(_0x3e81c3[_0x4aac('0x4a')],null))[_0x4aac('0x28')](respondWithResult(_0x4b5fa1,null))[_0x4aac('0x46')](handleError(_0x4b5fa1,null));};exports['destroy']=function(_0x57fcc7,_0x4aeb9f){return db[_0x4aac('0x2e')][_0x4aac('0x48')]({'where':{'id':_0x57fcc7[_0x4aac('0x4b')]['id']}})['then'](handleEntityNotFound(_0x4aeb9f,null))[_0x4aac('0x28')](removeEntity(_0x4aeb9f,null))[_0x4aac('0x46')](handleError(_0x4aeb9f,null));};
\ No newline at end of file