Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / api / intDynamics365Field / intDynamics365Field.controller.js
index 27fd3b2..ed2df4b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8f45=['querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','end','error','stack','name','send','index','rawAttributes','type','key','map','query','keys','intersection','model','attributes','fields','nolimit','order','sort','where','pick','filters','filter','merge','VIRTUAL','options','Dynamics365Field','includeAll','include','findAll','catch','show','params','length','create','body','find','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','path','to-csv','ejs','lodash','squel','jsforce'];(function(_0x4ef34e,_0x11ac32){var _0x3a6f82=function(_0x5e3df9){while(--_0x5e3df9){_0x4ef34e['push'](_0x4ef34e['shift']());}};_0x3a6f82(++_0x11ac32);}(_0x8f45,0x87));var _0x58f4=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0x8f45[_0x2c91e9];return _0x13f0ff;};'use strict';var emlformat=require(_0x58f4('0x0'));var rimraf=require(_0x58f4('0x1'));var zipdir=require(_0x58f4('0x2'));var jsonpatch=require(_0x58f4('0x3'));var rp=require('request-promise');var moment=require(_0x58f4('0x4'));var BPromise=require(_0x58f4('0x5'));var Mustache=require(_0x58f4('0x6'));var util=require('util');var path=require(_0x58f4('0x7'));var sox=require('sox');var csv=require(_0x58f4('0x8'));var ejs=require(_0x58f4('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x58f4('0xa'));var squel=require(_0x58f4('0xb'));var crypto=require('crypto');var jsforce=require(_0x58f4('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x58f4('0xd'));var Papa=require(_0x58f4('0xe'));var Redis=require('ioredis');var authService=require(_0x58f4('0xf'));var qs=require(_0x58f4('0x10'));var as=require(_0x58f4('0x11'));var hardwareService=require(_0x58f4('0x12'));var logger=require(_0x58f4('0x13'))(_0x58f4('0x14'));var utils=require(_0x58f4('0x15'));var config=require(_0x58f4('0x16'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1e89a0,_0x210812){_0x210812=_0x210812||0xcc;return function(_0x420f33){if(_0x420f33){return _0x1e89a0[_0x58f4('0x17')](_0x210812);}return _0x1e89a0[_0x58f4('0x18')](_0x210812)['end']();};}function respondWithResult(_0x1512ee,_0x1592f9){_0x1592f9=_0x1592f9||0xc8;return function(_0x4da631){if(_0x4da631){return _0x1512ee[_0x58f4('0x18')](_0x1592f9)[_0x58f4('0x19')](_0x4da631);}};}function respondWithFilteredResult(_0x3e134a,_0x232b24){return function(_0x57592f){if(_0x57592f){var _0xcb4a3f=typeof _0x232b24[_0x58f4('0x1a')]===_0x58f4('0x1b')&&typeof _0x232b24[_0x58f4('0x1c')]===_0x58f4('0x1b');var _0x549de9=_0x57592f[_0x58f4('0x1d')];var _0x871b18=_0xcb4a3f?0x0:_0x232b24[_0x58f4('0x1a')];var _0x56ef54=_0xcb4a3f?_0x57592f[_0x58f4('0x1d')]:_0x232b24[_0x58f4('0x1a')]+_0x232b24['limit'];var _0x2d9ae4;if(_0x56ef54>=_0x549de9){_0x56ef54=_0x549de9;_0x2d9ae4=0xc8;}else{_0x2d9ae4=0xce;}_0x3e134a[_0x58f4('0x18')](_0x2d9ae4);return _0x3e134a[_0x58f4('0x1e')](_0x58f4('0x1f'),_0x871b18+'-'+_0x56ef54+'/'+_0x549de9)[_0x58f4('0x19')](_0x57592f);}return null;};}function patchUpdates(_0x3b7ad6){return function(_0x48554a){try{jsonpatch[_0x58f4('0x20')](_0x48554a,_0x3b7ad6,!![]);}catch(_0x1e9a45){return BPromise[_0x58f4('0x21')](_0x1e9a45);}return _0x48554a[_0x58f4('0x22')]();};}function saveUpdates(_0x4f75a8,_0x2e31c8){return function(_0x2f0471){if(_0x2f0471){return _0x2f0471[_0x58f4('0x23')](_0x4f75a8)[_0x58f4('0x24')](function(_0xc4f3f){return _0xc4f3f;});}return null;};}function removeEntity(_0x5ce124,_0x18a102){return function(_0x1b6ec4){if(_0x1b6ec4){return _0x1b6ec4['destroy']()['then'](function(){_0x5ce124[_0x58f4('0x18')](0xcc)[_0x58f4('0x25')]();});}};}function handleEntityNotFound(_0xa0a502,_0x3dd47f){return function(_0x1ad217){if(!_0x1ad217){_0xa0a502['sendStatus'](0x194);}return _0x1ad217;};}function handleError(_0x48824e,_0x4f5a6f){_0x4f5a6f=_0x4f5a6f||0x1f4;return function(_0x3062a8){logger[_0x58f4('0x26')](_0x3062a8[_0x58f4('0x27')]);if(_0x3062a8[_0x58f4('0x28')]){delete _0x3062a8[_0x58f4('0x28')];}_0x48824e[_0x58f4('0x18')](_0x4f5a6f)[_0x58f4('0x29')](_0x3062a8);};}exports[_0x58f4('0x2a')]=function(_0x1d23a3,_0x14b8a7){var _0x30d67c={},_0x52529c={},_0x30c33e={'count':0x0,'rows':[]};var _0x244a3b=_['map'](db['Dynamics365Field'][_0x58f4('0x2b')],function(_0x26b903){return{'name':_0x26b903['fieldName'],'type':_0x26b903[_0x58f4('0x2c')][_0x58f4('0x2d')]};});_0x52529c['model']=_[_0x58f4('0x2e')](_0x244a3b,_0x58f4('0x28'));_0x52529c[_0x58f4('0x2f')]=_[_0x58f4('0x30')](_0x1d23a3[_0x58f4('0x2f')]);_0x52529c['filters']=_[_0x58f4('0x31')](_0x52529c[_0x58f4('0x32')],_0x52529c['query']);_0x30d67c[_0x58f4('0x33')]=_[_0x58f4('0x31')](_0x52529c[_0x58f4('0x32')],qs[_0x58f4('0x34')](_0x1d23a3[_0x58f4('0x2f')][_0x58f4('0x34')]));_0x30d67c['attributes']=_0x30d67c[_0x58f4('0x33')]['length']?_0x30d67c['attributes']:_0x52529c['model'];if(!_0x1d23a3[_0x58f4('0x2f')]['hasOwnProperty'](_0x58f4('0x35'))){_0x30d67c['limit']=qs['limit'](_0x1d23a3[_0x58f4('0x2f')][_0x58f4('0x1c')]);_0x30d67c[_0x58f4('0x1a')]=qs[_0x58f4('0x1a')](_0x1d23a3['query'][_0x58f4('0x1a')]);}_0x30d67c[_0x58f4('0x36')]=qs[_0x58f4('0x37')](_0x1d23a3[_0x58f4('0x2f')][_0x58f4('0x37')]);_0x30d67c[_0x58f4('0x38')]=qs['filters'](_[_0x58f4('0x39')](_0x1d23a3[_0x58f4('0x2f')],_0x52529c[_0x58f4('0x3a')]),_0x244a3b);if(_0x1d23a3['query'][_0x58f4('0x3b')]){_0x30d67c[_0x58f4('0x38')]=_[_0x58f4('0x3c')](_0x30d67c[_0x58f4('0x38')],{'$or':_[_0x58f4('0x2e')](_0x244a3b,function(_0x8d3fe1){if(_0x8d3fe1['type']!==_0x58f4('0x3d')){var _0x190a4c={};_0x190a4c[_0x8d3fe1[_0x58f4('0x28')]]={'$like':'%'+_0x1d23a3[_0x58f4('0x2f')][_0x58f4('0x3b')]+'%'};return _0x190a4c;}})});}_0x30d67c=_['merge']({},_0x30d67c,_0x1d23a3[_0x58f4('0x3e')]);var _0x2ed95e={'where':_0x30d67c[_0x58f4('0x38')]};return db[_0x58f4('0x3f')]['count'](_0x2ed95e)[_0x58f4('0x24')](function(_0x49fcf8){_0x30c33e[_0x58f4('0x1d')]=_0x49fcf8;if(_0x1d23a3[_0x58f4('0x2f')][_0x58f4('0x40')]){_0x30d67c[_0x58f4('0x41')]=[{'all':!![]}];}return db[_0x58f4('0x3f')][_0x58f4('0x42')](_0x30d67c);})[_0x58f4('0x24')](function(_0x2d0372){_0x30c33e['rows']=_0x2d0372;return _0x30c33e;})['then'](respondWithFilteredResult(_0x14b8a7,_0x30d67c))[_0x58f4('0x43')](handleError(_0x14b8a7,null));};exports[_0x58f4('0x44')]=function(_0x5f5317,_0x12a516){var _0x233aaa={'raw':!![],'where':{'id':_0x5f5317[_0x58f4('0x45')]['id']}},_0x39cb3b={};_0x39cb3b[_0x58f4('0x32')]=_['keys'](db['Dynamics365Field'][_0x58f4('0x2b')]);_0x39cb3b[_0x58f4('0x2f')]=_['keys'](_0x5f5317['query']);_0x39cb3b[_0x58f4('0x3a')]=_[_0x58f4('0x31')](_0x39cb3b[_0x58f4('0x32')],_0x39cb3b[_0x58f4('0x2f')]);_0x233aaa['attributes']=_[_0x58f4('0x31')](_0x39cb3b[_0x58f4('0x32')],qs[_0x58f4('0x34')](_0x5f5317[_0x58f4('0x2f')][_0x58f4('0x34')]));_0x233aaa['attributes']=_0x233aaa[_0x58f4('0x33')][_0x58f4('0x46')]?_0x233aaa[_0x58f4('0x33')]:_0x39cb3b[_0x58f4('0x32')];if(_0x5f5317[_0x58f4('0x2f')][_0x58f4('0x40')]){_0x233aaa[_0x58f4('0x41')]=[{'all':!![]}];}_0x233aaa=_[_0x58f4('0x3c')]({},_0x233aaa,_0x5f5317[_0x58f4('0x3e')]);return db[_0x58f4('0x3f')]['find'](_0x233aaa)[_0x58f4('0x24')](handleEntityNotFound(_0x12a516,null))[_0x58f4('0x24')](respondWithResult(_0x12a516,null))[_0x58f4('0x43')](handleError(_0x12a516,null));};exports[_0x58f4('0x47')]=function(_0x6871a9,_0x3b4e00){return db[_0x58f4('0x3f')]['create'](_0x6871a9['body'],{})[_0x58f4('0x24')](respondWithResult(_0x3b4e00,0xc9))[_0x58f4('0x43')](handleError(_0x3b4e00,null));};exports[_0x58f4('0x23')]=function(_0x1d123a,_0x3297f7){if(_0x1d123a['body']['id']){delete _0x1d123a[_0x58f4('0x48')]['id'];}return db[_0x58f4('0x3f')][_0x58f4('0x49')]({'where':{'id':_0x1d123a[_0x58f4('0x45')]['id']}})[_0x58f4('0x24')](handleEntityNotFound(_0x3297f7,null))[_0x58f4('0x24')](saveUpdates(_0x1d123a[_0x58f4('0x48')],null))[_0x58f4('0x24')](respondWithResult(_0x3297f7,null))[_0x58f4('0x43')](handleError(_0x3297f7,null));};exports['destroy']=function(_0x5bfe62,_0x390b56){return db['Dynamics365Field'][_0x58f4('0x49')]({'where':{'id':_0x5bfe62[_0x58f4('0x45')]['id']}})[_0x58f4('0x24')](handleEntityNotFound(_0x390b56,null))[_0x58f4('0x24')](removeEntity(_0x390b56,null))[_0x58f4('0x43')](handleError(_0x390b56,null));};
\ No newline at end of file
+var _0x2b6a=['params','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','ejs','fs-extra','squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','../../config/utils','../../config/environment','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','update','then','destroy','error','stack','name','send','index','map','Dynamics365Field','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','type','VIRTUAL','includeAll','include','rows','catch','rawAttributes','options','find','create','body'];(function(_0x2f8f04,_0x14be70){var _0x42c3b4=function(_0x23126b){while(--_0x23126b){_0x2f8f04['push'](_0x2f8f04['shift']());}};_0x42c3b4(++_0x14be70);}(_0x2b6a,0x1b1));var _0xa2b6=function(_0x4aee52,_0x54a7d8){_0x4aee52=_0x4aee52-0x0;var _0x24c75b=_0x2b6a[_0x4aee52];return _0x24c75b;};'use strict';var emlformat=require(_0xa2b6('0x0'));var rimraf=require(_0xa2b6('0x1'));var zipdir=require(_0xa2b6('0x2'));var jsonpatch=require(_0xa2b6('0x3'));var rp=require(_0xa2b6('0x4'));var moment=require(_0xa2b6('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xa2b6('0x6'));var util=require(_0xa2b6('0x7'));var path=require('path');var sox=require(_0xa2b6('0x8'));var csv=require(_0xa2b6('0x9'));var ejs=require(_0xa2b6('0xa'));var fs=require('fs');var fs_extra=require(_0xa2b6('0xb'));var _=require('lodash');var squel=require(_0xa2b6('0xc'));var crypto=require(_0xa2b6('0xd'));var jsforce=require('jsforce');var deskjs=require(_0xa2b6('0xe'));var toCsv=require(_0xa2b6('0x9'));var querystring=require(_0xa2b6('0xf'));var Papa=require('papaparse');var Redis=require(_0xa2b6('0x10'));var authService=require(_0xa2b6('0x11'));var qs=require(_0xa2b6('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xa2b6('0x13'))('api');var utils=require(_0xa2b6('0x14'));var config=require(_0xa2b6('0x15'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x386929,_0x32ff20){_0x32ff20=_0x32ff20||0xcc;return function(_0x2d8925){if(_0x2d8925){return _0x386929[_0xa2b6('0x16')](_0x32ff20);}return _0x386929['status'](_0x32ff20)[_0xa2b6('0x17')]();};}function respondWithResult(_0xb1bdee,_0x20b5ea){_0x20b5ea=_0x20b5ea||0xc8;return function(_0x38efd2){if(_0x38efd2){return _0xb1bdee[_0xa2b6('0x18')](_0x20b5ea)[_0xa2b6('0x19')](_0x38efd2);}};}function respondWithFilteredResult(_0x3ac569,_0x2307ee){return function(_0x1cb41e){if(_0x1cb41e){var _0x674304=typeof _0x2307ee[_0xa2b6('0x1a')]===_0xa2b6('0x1b')&&typeof _0x2307ee[_0xa2b6('0x1c')]===_0xa2b6('0x1b');var _0x3810fa=_0x1cb41e[_0xa2b6('0x1d')];var _0x22f830=_0x674304?0x0:_0x2307ee[_0xa2b6('0x1a')];var _0x49c174=_0x674304?_0x1cb41e['count']:_0x2307ee[_0xa2b6('0x1a')]+_0x2307ee[_0xa2b6('0x1c')];var _0x3e11c0;if(_0x49c174>=_0x3810fa){_0x49c174=_0x3810fa;_0x3e11c0=0xc8;}else{_0x3e11c0=0xce;}_0x3ac569[_0xa2b6('0x18')](_0x3e11c0);return _0x3ac569[_0xa2b6('0x1e')](_0xa2b6('0x1f'),_0x22f830+'-'+_0x49c174+'/'+_0x3810fa)['json'](_0x1cb41e);}return null;};}function patchUpdates(_0x581579){return function(_0x283925){try{jsonpatch[_0xa2b6('0x20')](_0x283925,_0x581579,!![]);}catch(_0x40ef22){return BPromise['reject'](_0x40ef22);}return _0x283925['save']();};}function saveUpdates(_0x49d87a,_0xb131ba){return function(_0x1f3889){if(_0x1f3889){return _0x1f3889[_0xa2b6('0x21')](_0x49d87a)[_0xa2b6('0x22')](function(_0x3f48e3){return _0x3f48e3;});}return null;};}function removeEntity(_0x5a4abc,_0x262522){return function(_0x4061e6){if(_0x4061e6){return _0x4061e6[_0xa2b6('0x23')]()[_0xa2b6('0x22')](function(){_0x5a4abc['status'](0xcc)[_0xa2b6('0x17')]();});}};}function handleEntityNotFound(_0x4f33fe,_0x6ad672){return function(_0x531ab3){if(!_0x531ab3){_0x4f33fe[_0xa2b6('0x16')](0x194);}return _0x531ab3;};}function handleError(_0x426a1a,_0x3f7b8e){_0x3f7b8e=_0x3f7b8e||0x1f4;return function(_0x226ef8){logger[_0xa2b6('0x24')](_0x226ef8[_0xa2b6('0x25')]);if(_0x226ef8['name']){delete _0x226ef8[_0xa2b6('0x26')];}_0x426a1a[_0xa2b6('0x18')](_0x3f7b8e)[_0xa2b6('0x27')](_0x226ef8);};}exports[_0xa2b6('0x28')]=function(_0x12df74,_0x5ab9f9){var _0x433a31={},_0xabe903={},_0x148623={'count':0x0,'rows':[]};var _0x6f255c=_[_0xa2b6('0x29')](db[_0xa2b6('0x2a')]['rawAttributes'],function(_0x32ff72){return{'name':_0x32ff72[_0xa2b6('0x2b')],'type':_0x32ff72['type'][_0xa2b6('0x2c')]};});_0xabe903[_0xa2b6('0x2d')]=_['map'](_0x6f255c,_0xa2b6('0x26'));_0xabe903[_0xa2b6('0x2e')]=_[_0xa2b6('0x2f')](_0x12df74[_0xa2b6('0x2e')]);_0xabe903[_0xa2b6('0x30')]=_[_0xa2b6('0x31')](_0xabe903[_0xa2b6('0x2d')],_0xabe903[_0xa2b6('0x2e')]);_0x433a31[_0xa2b6('0x32')]=_[_0xa2b6('0x31')](_0xabe903[_0xa2b6('0x2d')],qs[_0xa2b6('0x33')](_0x12df74[_0xa2b6('0x2e')]['fields']));_0x433a31[_0xa2b6('0x32')]=_0x433a31['attributes'][_0xa2b6('0x34')]?_0x433a31[_0xa2b6('0x32')]:_0xabe903['model'];if(!_0x12df74['query'][_0xa2b6('0x35')](_0xa2b6('0x36'))){_0x433a31[_0xa2b6('0x1c')]=qs[_0xa2b6('0x1c')](_0x12df74[_0xa2b6('0x2e')][_0xa2b6('0x1c')]);_0x433a31[_0xa2b6('0x1a')]=qs[_0xa2b6('0x1a')](_0x12df74['query'][_0xa2b6('0x1a')]);}_0x433a31[_0xa2b6('0x37')]=qs[_0xa2b6('0x38')](_0x12df74[_0xa2b6('0x2e')][_0xa2b6('0x38')]);_0x433a31[_0xa2b6('0x39')]=qs[_0xa2b6('0x30')](_['pick'](_0x12df74[_0xa2b6('0x2e')],_0xabe903[_0xa2b6('0x30')]),_0x6f255c);if(_0x12df74[_0xa2b6('0x2e')][_0xa2b6('0x3a')]){_0x433a31[_0xa2b6('0x39')]=_[_0xa2b6('0x3b')](_0x433a31[_0xa2b6('0x39')],{'$or':_[_0xa2b6('0x29')](_0x6f255c,function(_0x57fe55){if(_0x57fe55[_0xa2b6('0x3c')]!==_0xa2b6('0x3d')){var _0x3125dc={};_0x3125dc[_0x57fe55[_0xa2b6('0x26')]]={'$like':'%'+_0x12df74[_0xa2b6('0x2e')][_0xa2b6('0x3a')]+'%'};return _0x3125dc;}})});}_0x433a31=_[_0xa2b6('0x3b')]({},_0x433a31,_0x12df74['options']);var _0x1022d1={'where':_0x433a31[_0xa2b6('0x39')]};return db['Dynamics365Field'][_0xa2b6('0x1d')](_0x1022d1)[_0xa2b6('0x22')](function(_0x5d9aa5){_0x148623[_0xa2b6('0x1d')]=_0x5d9aa5;if(_0x12df74[_0xa2b6('0x2e')][_0xa2b6('0x3e')]){_0x433a31[_0xa2b6('0x3f')]=[{'all':!![]}];}return db[_0xa2b6('0x2a')]['findAll'](_0x433a31);})[_0xa2b6('0x22')](function(_0x161c8f){_0x148623[_0xa2b6('0x40')]=_0x161c8f;return _0x148623;})[_0xa2b6('0x22')](respondWithFilteredResult(_0x5ab9f9,_0x433a31))[_0xa2b6('0x41')](handleError(_0x5ab9f9,null));};exports['show']=function(_0xb530e8,_0x294df6){var _0x5427b5={'raw':!![],'where':{'id':_0xb530e8['params']['id']}},_0x12fd5d={};_0x12fd5d[_0xa2b6('0x2d')]=_[_0xa2b6('0x2f')](db[_0xa2b6('0x2a')][_0xa2b6('0x42')]);_0x12fd5d['query']=_[_0xa2b6('0x2f')](_0xb530e8[_0xa2b6('0x2e')]);_0x12fd5d[_0xa2b6('0x30')]=_[_0xa2b6('0x31')](_0x12fd5d[_0xa2b6('0x2d')],_0x12fd5d[_0xa2b6('0x2e')]);_0x5427b5[_0xa2b6('0x32')]=_[_0xa2b6('0x31')](_0x12fd5d['model'],qs[_0xa2b6('0x33')](_0xb530e8[_0xa2b6('0x2e')][_0xa2b6('0x33')]));_0x5427b5['attributes']=_0x5427b5['attributes'][_0xa2b6('0x34')]?_0x5427b5[_0xa2b6('0x32')]:_0x12fd5d[_0xa2b6('0x2d')];if(_0xb530e8[_0xa2b6('0x2e')][_0xa2b6('0x3e')]){_0x5427b5[_0xa2b6('0x3f')]=[{'all':!![]}];}_0x5427b5=_[_0xa2b6('0x3b')]({},_0x5427b5,_0xb530e8[_0xa2b6('0x43')]);return db[_0xa2b6('0x2a')][_0xa2b6('0x44')](_0x5427b5)['then'](handleEntityNotFound(_0x294df6,null))[_0xa2b6('0x22')](respondWithResult(_0x294df6,null))[_0xa2b6('0x41')](handleError(_0x294df6,null));};exports[_0xa2b6('0x45')]=function(_0x1b0861,_0x4418af){return db[_0xa2b6('0x2a')][_0xa2b6('0x45')](_0x1b0861[_0xa2b6('0x46')],{})[_0xa2b6('0x22')](respondWithResult(_0x4418af,0xc9))[_0xa2b6('0x41')](handleError(_0x4418af,null));};exports[_0xa2b6('0x21')]=function(_0x420872,_0x2e1436){if(_0x420872[_0xa2b6('0x46')]['id']){delete _0x420872['body']['id'];}return db['Dynamics365Field']['find']({'where':{'id':_0x420872[_0xa2b6('0x47')]['id']}})[_0xa2b6('0x22')](handleEntityNotFound(_0x2e1436,null))['then'](saveUpdates(_0x420872[_0xa2b6('0x46')],null))[_0xa2b6('0x22')](respondWithResult(_0x2e1436,null))[_0xa2b6('0x41')](handleError(_0x2e1436,null));};exports[_0xa2b6('0x23')]=function(_0x566c6f,_0x178adf){return db[_0xa2b6('0x2a')][_0xa2b6('0x44')]({'where':{'id':_0x566c6f[_0xa2b6('0x47')]['id']}})[_0xa2b6('0x22')](handleEntityNotFound(_0x178adf,null))[_0xa2b6('0x22')](removeEntity(_0x178adf,null))['catch'](handleError(_0x178adf,null));};
\ No newline at end of file