Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / api / cmCustomField / cmCustomField.controller.js
index 135fa77..13d73ee 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x31f0=['cf_%d','eml-format','zip-dir','request-promise','moment','bluebird','mustache','path','sox','lodash','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','offset','limit','undefined','count','set','Content-Range','json','apply','reject','update','destroy','then','stack','name','send','render','merge','body','message','agent','interaction','account','index','CmCustomField','rawAttributes','fieldName','type','key','model','differenceBy','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','VIRTUAL','options','include','rows','catch','show','params','includeAll','find','create','sequelize','transaction','Sequelize','TEXT','text','INTEGER','queryInterface','cm_contacts','format'];(function(_0x4bb429,_0x4c1363){var _0x4a824b=function(_0x57c840){while(--_0x57c840){_0x4bb429['push'](_0x4bb429['shift']());}};_0x4a824b(++_0x4c1363);}(_0x31f0,0xb7));var _0x031f=function(_0x3e5dcc,_0x54a7a6){_0x3e5dcc=_0x3e5dcc-0x0;var _0x37eecc=_0x31f0[_0x3e5dcc];return _0x37eecc;};'use strict';var emlformat=require(_0x031f('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x031f('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x031f('0x2'));var moment=require(_0x031f('0x3'));var BPromise=require(_0x031f('0x4'));var Mustache=require(_0x031f('0x5'));var util=require('util');var path=require(_0x031f('0x6'));var sox=require(_0x031f('0x7'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x031f('0x8'));var squel=require('squel');var crypto=require(_0x031f('0x9'));var jsforce=require(_0x031f('0xa'));var deskjs=require(_0x031f('0xb'));var toCsv=require(_0x031f('0xc'));var querystring=require('querystring');var Papa=require(_0x031f('0xd'));var Redis=require(_0x031f('0xe'));var authService=require(_0x031f('0xf'));var qs=require(_0x031f('0x10'));var as=require(_0x031f('0x11'));var hardwareService=require(_0x031f('0x12'));var logger=require(_0x031f('0x13'))(_0x031f('0x14'));var utils=require('../../config/utils');var config=require(_0x031f('0x15'));var licenseUtil=require(_0x031f('0x16'));var db=require(_0x031f('0x17'))['db'];function respondWithStatusCode(_0x351052,_0x3819bb){_0x3819bb=_0x3819bb||0xcc;return function(_0x405896){if(_0x405896){return _0x351052[_0x031f('0x18')](_0x3819bb);}return _0x351052['status'](_0x3819bb)[_0x031f('0x19')]();};}function respondWithResult(_0x23b40c,_0x17a699){_0x17a699=_0x17a699||0xc8;return function(_0x2e3dfe){if(_0x2e3dfe){return _0x23b40c[_0x031f('0x1a')](_0x17a699)['json'](_0x2e3dfe);}};}function respondWithFilteredResult(_0x4b7011,_0x1f08db){return function(_0x3a10aa){if(_0x3a10aa){var _0xe4fc1d=typeof _0x1f08db[_0x031f('0x1b')]==='undefined'&&typeof _0x1f08db[_0x031f('0x1c')]===_0x031f('0x1d');var _0x5d0c70=_0x3a10aa[_0x031f('0x1e')];var _0x535e70=_0xe4fc1d?0x0:_0x1f08db[_0x031f('0x1b')];var _0x5f2199=_0xe4fc1d?_0x3a10aa[_0x031f('0x1e')]:_0x1f08db[_0x031f('0x1b')]+_0x1f08db[_0x031f('0x1c')];var _0x26cb5e;if(_0x5f2199>=_0x5d0c70){_0x5f2199=_0x5d0c70;_0x26cb5e=0xc8;}else{_0x26cb5e=0xce;}_0x4b7011[_0x031f('0x1a')](_0x26cb5e);return _0x4b7011[_0x031f('0x1f')](_0x031f('0x20'),_0x535e70+'-'+_0x5f2199+'/'+_0x5d0c70)[_0x031f('0x21')](_0x3a10aa);}return null;};}function patchUpdates(_0x29dd6e){return function(_0x48a76e){try{jsonpatch[_0x031f('0x22')](_0x48a76e,_0x29dd6e,!![]);}catch(_0x33926c){return BPromise[_0x031f('0x23')](_0x33926c);}return _0x48a76e['save']();};}function saveUpdates(_0x5c4184,_0xa11a2b){return function(_0x4d0f92){if(_0x4d0f92){return _0x4d0f92[_0x031f('0x24')](_0x5c4184)['then'](function(_0x54d054){return _0x54d054;});}return null;};}function removeEntity(_0x47d639,_0x971691){return function(_0x12c406){if(_0x12c406){return _0x12c406[_0x031f('0x25')]()[_0x031f('0x26')](function(){_0x47d639['status'](0xcc)[_0x031f('0x19')]();});}};}function handleEntityNotFound(_0x5a64c0,_0x40cb1c){return function(_0x1f5a14){if(!_0x1f5a14){_0x5a64c0[_0x031f('0x18')](0x194);}return _0x1f5a14;};}function handleError(_0x567666,_0x35af16){_0x35af16=_0x35af16||0x1f4;return function(_0x3b2a51){logger['error'](_0x3b2a51[_0x031f('0x27')]);if(_0x3b2a51[_0x031f('0x28')]){delete _0x3b2a51[_0x031f('0x28')];}_0x567666['status'](_0x35af16)[_0x031f('0x29')](_0x3b2a51);};}function getMustacheRender(_0x114e34,_0xb6ed6c){return Mustache[_0x031f('0x2a')](_0x114e34,_[_0x031f('0x2b')](_0xb6ed6c[_0x031f('0x2c')],{'contact':_0xb6ed6c['contact'],'message':_0xb6ed6c[_0x031f('0x2d')],'agent':_0xb6ed6c[_0x031f('0x2e')],'interaction':_0xb6ed6c[_0x031f('0x2f')],'account':_0xb6ed6c[_0x031f('0x30')]}))||'';}exports[_0x031f('0x31')]=function(_0x2d24f0,_0x378692){var _0x87dc07={},_0x2034ac={},_0xfc4a89={'count':0x0,'rows':[]};var _0x2cf3a8=_['map'](db[_0x031f('0x32')][_0x031f('0x33')],function(_0xb3a6bd){return{'name':_0xb3a6bd[_0x031f('0x34')],'type':_0xb3a6bd[_0x031f('0x35')][_0x031f('0x36')]};});_0x2034ac[_0x031f('0x37')]=_[_0x031f('0x38')](_[_0x031f('0x39')](_0x2cf3a8,_0x031f('0x28')),[_0x031f('0x28')]);_0x2034ac[_0x031f('0x3a')]=_[_0x031f('0x3b')](_0x2d24f0['query']);_0x2034ac[_0x031f('0x3c')]=_[_0x031f('0x3d')](_0x2034ac['model'],_0x2034ac[_0x031f('0x3a')]);_0x87dc07[_0x031f('0x3e')]=_['intersection'](_0x2034ac[_0x031f('0x37')],qs[_0x031f('0x3f')](_0x2d24f0[_0x031f('0x3a')][_0x031f('0x3f')]));_0x87dc07['attributes']=_0x87dc07['attributes'][_0x031f('0x40')]?_0x87dc07['attributes']:_0x2034ac[_0x031f('0x37')];if(!_0x2d24f0[_0x031f('0x3a')][_0x031f('0x41')]('nolimit')){_0x87dc07['limit']=qs[_0x031f('0x1c')](_0x2d24f0['query']['limit']);_0x87dc07[_0x031f('0x1b')]=qs[_0x031f('0x1b')](_0x2d24f0[_0x031f('0x3a')][_0x031f('0x1b')]);}_0x87dc07[_0x031f('0x42')]=qs[_0x031f('0x43')](_0x2d24f0[_0x031f('0x3a')]['sort']);_0x87dc07[_0x031f('0x44')]=qs[_0x031f('0x3c')](_[_0x031f('0x45')](_0x2d24f0[_0x031f('0x3a')],_0x2034ac['filters']),_0x2cf3a8);if(_0x2d24f0[_0x031f('0x3a')][_0x031f('0x46')]){_0x87dc07[_0x031f('0x44')]=_['merge'](_0x87dc07[_0x031f('0x44')],{'$or':_[_0x031f('0x39')](_0x2cf3a8,function(_0x5d6826){if(_0x5d6826[_0x031f('0x35')]!==_0x031f('0x47')){var _0x56a8f3={};_0x56a8f3[_0x5d6826['name']]={'$like':'%'+_0x2d24f0[_0x031f('0x3a')][_0x031f('0x46')]+'%'};return _0x56a8f3;}})});}_0x87dc07=_[_0x031f('0x2b')]({},_0x87dc07,_0x2d24f0[_0x031f('0x48')]);var _0x2691b7={'where':_0x87dc07[_0x031f('0x44')]};return db[_0x031f('0x32')]['count'](_0x2691b7)[_0x031f('0x26')](function(_0xe71615){_0xfc4a89['count']=_0xe71615;if(_0x2d24f0[_0x031f('0x3a')]['includeAll']){_0x87dc07[_0x031f('0x49')]=[{'all':!![]}];}return db[_0x031f('0x32')]['findAll'](_0x87dc07);})[_0x031f('0x26')](function(_0x391cd1){_0xfc4a89[_0x031f('0x4a')]=_0x391cd1;return _0xfc4a89;})['then'](respondWithFilteredResult(_0x378692,_0x87dc07))[_0x031f('0x4b')](handleError(_0x378692,null));};exports[_0x031f('0x4c')]=function(_0x1d3324,_0x2a6cba){var _0x177306={'raw':!![],'where':{'id':_0x1d3324[_0x031f('0x4d')]['id']}},_0x193b8f={};_0x193b8f[_0x031f('0x37')]=_[_0x031f('0x3b')](db['CmCustomField'][_0x031f('0x33')]);_0x193b8f[_0x031f('0x3a')]=_[_0x031f('0x3b')](_0x1d3324[_0x031f('0x3a')]);_0x193b8f[_0x031f('0x3c')]=_[_0x031f('0x3d')](_0x193b8f[_0x031f('0x37')],_0x193b8f[_0x031f('0x3a')]);_0x177306[_0x031f('0x3e')]=_['intersection'](_0x193b8f[_0x031f('0x37')],qs['fields'](_0x1d3324['query'][_0x031f('0x3f')]));_0x177306[_0x031f('0x3e')]=_0x177306[_0x031f('0x3e')][_0x031f('0x40')]?_0x177306[_0x031f('0x3e')]:_0x193b8f['model'];if(_0x1d3324[_0x031f('0x3a')][_0x031f('0x4e')]){_0x177306[_0x031f('0x49')]=[{'all':!![]}];}_0x177306=_['merge']({},_0x177306,_0x1d3324[_0x031f('0x48')]);return db[_0x031f('0x32')][_0x031f('0x4f')](_0x177306)[_0x031f('0x26')](handleEntityNotFound(_0x2a6cba,null))[_0x031f('0x26')](respondWithResult(_0x2a6cba,null))[_0x031f('0x4b')](handleError(_0x2a6cba,null));};exports['update']=function(_0x569d8f,_0xd28ade){if(_0x569d8f['body']['id']){delete _0x569d8f[_0x031f('0x2c')]['id'];}return db[_0x031f('0x32')]['find']({'where':{'id':_0x569d8f[_0x031f('0x4d')]['id']}})['then'](handleEntityNotFound(_0xd28ade,null))['then'](saveUpdates(_0x569d8f[_0x031f('0x2c')],null))['then'](respondWithResult(_0xd28ade,null))[_0x031f('0x4b')](handleError(_0xd28ade,null));};exports['destroy']=function(_0x11bf43,_0x2137c3){return db['CmCustomField'][_0x031f('0x4f')]({'where':{'id':_0x11bf43[_0x031f('0x4d')]['id']}})['then'](handleEntityNotFound(_0x2137c3,null))[_0x031f('0x26')](removeEntity(_0x2137c3,null))['catch'](handleError(_0x2137c3,null));};exports[_0x031f('0x50')]=function(_0x5e18f0,_0x1464df){var _0x24848b;return db[_0x031f('0x51')][_0x031f('0x52')](function(_0x691a68){return db['CmCustomField'][_0x031f('0x50')](_0x5e18f0['body'],{'transaction':_0x691a68})[_0x031f('0x26')](function(_0x414350){_0x24848b=_0x414350;var _0x4d49f8={'type':db[_0x031f('0x53')][_0x031f('0x54')],'transaction':_0x691a68};switch(_0x5e18f0['body'][_0x031f('0x35')]){case _0x031f('0x55'):_0x4d49f8[_0x031f('0x35')]=db['Sequelize'][_0x031f('0x54')];break;case'number':_0x4d49f8[_0x031f('0x35')]=db['Sequelize'][_0x031f('0x56')];break;case'switch':_0x4d49f8[_0x031f('0x35')]=db[_0x031f('0x53')]['BOOLEAN'];_0x4d49f8['defaultValue']=![];break;default:}return db[_0x031f('0x51')][_0x031f('0x57')]['addColumn'](_0x031f('0x58'),util[_0x031f('0x59')](_0x031f('0x5a'),_0x24848b['id']),_0x4d49f8);})[_0x031f('0x26')](function(){return _0x24848b;});})[_0x031f('0x26')](respondWithResult(_0x1464df,0xc9))[_0x031f('0x4b')](handleError(_0x1464df,null));};
\ No newline at end of file
+var _0x8958=['limit','count','offset','apply','reject','save','update','then','error','name','send','merge','body','contact','message','agent','index','CmCustomField','fieldName','type','key','model','map','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','pick','where','filter','options','includeAll','include','catch','show','rawAttributes','find','destroy','params','create','sequelize','transaction','Sequelize','text','number','INTEGER','switch','BOOLEAN','defaultValue','queryInterface','addColumn','cm_contacts','cf_%d','rimraf','bluebird','util','path','sox','ejs','fs-extra','lodash','squel','crypto','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined'];(function(_0x1831ca,_0x33fdd6){var _0x58dfcb=function(_0x302eaa){while(--_0x302eaa){_0x1831ca['push'](_0x1831ca['shift']());}};_0x58dfcb(++_0x33fdd6);}(_0x8958,0x93));var _0x8895=function(_0x104b77,_0x4c9182){_0x104b77=_0x104b77-0x0;var _0x156025=_0x8958[_0x104b77];return _0x156025;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x8895('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x8895('0x1'));var Mustache=require('mustache');var util=require(_0x8895('0x2'));var path=require(_0x8895('0x3'));var sox=require(_0x8895('0x4'));var csv=require('to-csv');var ejs=require(_0x8895('0x5'));var fs=require('fs');var fs_extra=require(_0x8895('0x6'));var _=require(_0x8895('0x7'));var squel=require(_0x8895('0x8'));var crypto=require(_0x8895('0x9'));var jsforce=require('jsforce');var deskjs=require(_0x8895('0xa'));var toCsv=require(_0x8895('0xb'));var querystring=require(_0x8895('0xc'));var Papa=require(_0x8895('0xd'));var Redis=require(_0x8895('0xe'));var authService=require(_0x8895('0xf'));var qs=require(_0x8895('0x10'));var as=require(_0x8895('0x11'));var hardwareService=require(_0x8895('0x12'));var logger=require(_0x8895('0x13'))('api');var utils=require(_0x8895('0x14'));var config=require(_0x8895('0x15'));var licenseUtil=require(_0x8895('0x16'));var db=require(_0x8895('0x17'))['db'];function respondWithStatusCode(_0x446e1a,_0xaf93bc){_0xaf93bc=_0xaf93bc||0xcc;return function(_0x5af0ef){if(_0x5af0ef){return _0x446e1a[_0x8895('0x18')](_0xaf93bc);}return _0x446e1a[_0x8895('0x19')](_0xaf93bc)[_0x8895('0x1a')]();};}function respondWithResult(_0x57d40a,_0x47b9fe){_0x47b9fe=_0x47b9fe||0xc8;return function(_0x9191b8){if(_0x9191b8){return _0x57d40a['status'](_0x47b9fe)[_0x8895('0x1b')](_0x9191b8);}};}function respondWithFilteredResult(_0x337101,_0x195789){return function(_0x3d7b59){if(_0x3d7b59){var _0x2c9d40=typeof _0x195789['offset']===_0x8895('0x1c')&&typeof _0x195789[_0x8895('0x1d')]===_0x8895('0x1c');var _0xcdd661=_0x3d7b59[_0x8895('0x1e')];var _0x1b5c82=_0x2c9d40?0x0:_0x195789[_0x8895('0x1f')];var _0x26cee0=_0x2c9d40?_0x3d7b59[_0x8895('0x1e')]:_0x195789[_0x8895('0x1f')]+_0x195789[_0x8895('0x1d')];var _0x6b8a16;if(_0x26cee0>=_0xcdd661){_0x26cee0=_0xcdd661;_0x6b8a16=0xc8;}else{_0x6b8a16=0xce;}_0x337101[_0x8895('0x19')](_0x6b8a16);return _0x337101['set']('Content-Range',_0x1b5c82+'-'+_0x26cee0+'/'+_0xcdd661)['json'](_0x3d7b59);}return null;};}function patchUpdates(_0x3daf43){return function(_0x456282){try{jsonpatch[_0x8895('0x20')](_0x456282,_0x3daf43,!![]);}catch(_0x29449a){return BPromise[_0x8895('0x21')](_0x29449a);}return _0x456282[_0x8895('0x22')]();};}function saveUpdates(_0x461346,_0xc1ce17){return function(_0x5219ca){if(_0x5219ca){return _0x5219ca[_0x8895('0x23')](_0x461346)[_0x8895('0x24')](function(_0x2a403){return _0x2a403;});}return null;};}function removeEntity(_0x1f71f3,_0x29223d){return function(_0x4d092d){if(_0x4d092d){return _0x4d092d['destroy']()[_0x8895('0x24')](function(){_0x1f71f3[_0x8895('0x19')](0xcc)[_0x8895('0x1a')]();});}};}function handleEntityNotFound(_0x24a376,_0x4fc150){return function(_0x25da11){if(!_0x25da11){_0x24a376[_0x8895('0x18')](0x194);}return _0x25da11;};}function handleError(_0x187a15,_0x5486a6){_0x5486a6=_0x5486a6||0x1f4;return function(_0x4aee03){logger[_0x8895('0x25')](_0x4aee03['stack']);if(_0x4aee03[_0x8895('0x26')]){delete _0x4aee03[_0x8895('0x26')];}_0x187a15[_0x8895('0x19')](_0x5486a6)[_0x8895('0x27')](_0x4aee03);};}function getMustacheRender(_0x153220,_0x5c03ea){return Mustache['render'](_0x153220,_[_0x8895('0x28')](_0x5c03ea[_0x8895('0x29')],{'contact':_0x5c03ea[_0x8895('0x2a')],'message':_0x5c03ea[_0x8895('0x2b')],'agent':_0x5c03ea[_0x8895('0x2c')],'interaction':_0x5c03ea['interaction'],'account':_0x5c03ea['account']}))||'';}exports[_0x8895('0x2d')]=function(_0x848a11,_0x1c16f6){var _0x29f565={},_0x1eabb6={},_0x52f2ac={'count':0x0,'rows':[]};var _0x1da939=_['map'](db[_0x8895('0x2e')]['rawAttributes'],function(_0x40ba14){return{'name':_0x40ba14[_0x8895('0x2f')],'type':_0x40ba14[_0x8895('0x30')][_0x8895('0x31')]};});_0x1eabb6[_0x8895('0x32')]=_['differenceBy'](_[_0x8895('0x33')](_0x1da939,_0x8895('0x26')),[_0x8895('0x26')]);_0x1eabb6[_0x8895('0x34')]=_[_0x8895('0x35')](_0x848a11['query']);_0x1eabb6[_0x8895('0x36')]=_['intersection'](_0x1eabb6[_0x8895('0x32')],_0x1eabb6['query']);_0x29f565[_0x8895('0x37')]=_[_0x8895('0x38')](_0x1eabb6[_0x8895('0x32')],qs[_0x8895('0x39')](_0x848a11[_0x8895('0x34')]['fields']));_0x29f565[_0x8895('0x37')]=_0x29f565['attributes'][_0x8895('0x3a')]?_0x29f565[_0x8895('0x37')]:_0x1eabb6[_0x8895('0x32')];if(!_0x848a11[_0x8895('0x34')][_0x8895('0x3b')](_0x8895('0x3c'))){_0x29f565['limit']=qs[_0x8895('0x1d')](_0x848a11[_0x8895('0x34')]['limit']);_0x29f565[_0x8895('0x1f')]=qs['offset'](_0x848a11[_0x8895('0x34')][_0x8895('0x1f')]);}_0x29f565['order']=qs[_0x8895('0x3d')](_0x848a11[_0x8895('0x34')]['sort']);_0x29f565['where']=qs[_0x8895('0x36')](_[_0x8895('0x3e')](_0x848a11[_0x8895('0x34')],_0x1eabb6[_0x8895('0x36')]),_0x1da939);if(_0x848a11[_0x8895('0x34')]['filter']){_0x29f565[_0x8895('0x3f')]=_[_0x8895('0x28')](_0x29f565[_0x8895('0x3f')],{'$or':_[_0x8895('0x33')](_0x1da939,function(_0x1d9e26){if(_0x1d9e26[_0x8895('0x30')]!=='VIRTUAL'){var _0x174be1={};_0x174be1[_0x1d9e26['name']]={'$like':'%'+_0x848a11[_0x8895('0x34')][_0x8895('0x40')]+'%'};return _0x174be1;}})});}_0x29f565=_['merge']({},_0x29f565,_0x848a11[_0x8895('0x41')]);var _0x4e8fbc={'where':_0x29f565[_0x8895('0x3f')]};return db['CmCustomField']['count'](_0x4e8fbc)['then'](function(_0x4cd625){_0x52f2ac['count']=_0x4cd625;if(_0x848a11['query'][_0x8895('0x42')]){_0x29f565[_0x8895('0x43')]=[{'all':!![]}];}return db['CmCustomField']['findAll'](_0x29f565);})[_0x8895('0x24')](function(_0x3d765d){_0x52f2ac['rows']=_0x3d765d;return _0x52f2ac;})[_0x8895('0x24')](respondWithFilteredResult(_0x1c16f6,_0x29f565))[_0x8895('0x44')](handleError(_0x1c16f6,null));};exports[_0x8895('0x45')]=function(_0x3b873b,_0x2d07d6){var _0x598ed5={'raw':!![],'where':{'id':_0x3b873b['params']['id']}},_0x549080={};_0x549080[_0x8895('0x32')]=_['keys'](db[_0x8895('0x2e')][_0x8895('0x46')]);_0x549080[_0x8895('0x34')]=_[_0x8895('0x35')](_0x3b873b['query']);_0x549080[_0x8895('0x36')]=_[_0x8895('0x38')](_0x549080[_0x8895('0x32')],_0x549080[_0x8895('0x34')]);_0x598ed5[_0x8895('0x37')]=_[_0x8895('0x38')](_0x549080[_0x8895('0x32')],qs[_0x8895('0x39')](_0x3b873b['query'][_0x8895('0x39')]));_0x598ed5[_0x8895('0x37')]=_0x598ed5['attributes'][_0x8895('0x3a')]?_0x598ed5['attributes']:_0x549080['model'];if(_0x3b873b[_0x8895('0x34')][_0x8895('0x42')]){_0x598ed5[_0x8895('0x43')]=[{'all':!![]}];}_0x598ed5=_['merge']({},_0x598ed5,_0x3b873b[_0x8895('0x41')]);return db['CmCustomField'][_0x8895('0x47')](_0x598ed5)[_0x8895('0x24')](handleEntityNotFound(_0x2d07d6,null))[_0x8895('0x24')](respondWithResult(_0x2d07d6,null))[_0x8895('0x44')](handleError(_0x2d07d6,null));};exports[_0x8895('0x23')]=function(_0x21c954,_0xebb0c4){if(_0x21c954['body']['id']){delete _0x21c954['body']['id'];}return db[_0x8895('0x2e')][_0x8895('0x47')]({'where':{'id':_0x21c954['params']['id']}})[_0x8895('0x24')](handleEntityNotFound(_0xebb0c4,null))['then'](saveUpdates(_0x21c954['body'],null))[_0x8895('0x24')](respondWithResult(_0xebb0c4,null))['catch'](handleError(_0xebb0c4,null));};exports[_0x8895('0x48')]=function(_0x2c2979,_0x43aada){return db[_0x8895('0x2e')][_0x8895('0x47')]({'where':{'id':_0x2c2979[_0x8895('0x49')]['id']}})[_0x8895('0x24')](handleEntityNotFound(_0x43aada,null))[_0x8895('0x24')](removeEntity(_0x43aada,null))['catch'](handleError(_0x43aada,null));};exports[_0x8895('0x4a')]=function(_0x3e25e7,_0x2f81f7){var _0x5a5bc6;return db[_0x8895('0x4b')][_0x8895('0x4c')](function(_0xd7ffeb){return db[_0x8895('0x2e')][_0x8895('0x4a')](_0x3e25e7[_0x8895('0x29')],{'transaction':_0xd7ffeb})[_0x8895('0x24')](function(_0x216e6e){_0x5a5bc6=_0x216e6e;var _0x13488f={'type':db[_0x8895('0x4d')]['TEXT'],'transaction':_0xd7ffeb};switch(_0x3e25e7[_0x8895('0x29')][_0x8895('0x30')]){case _0x8895('0x4e'):_0x13488f[_0x8895('0x30')]=db[_0x8895('0x4d')]['TEXT'];break;case _0x8895('0x4f'):_0x13488f[_0x8895('0x30')]=db[_0x8895('0x4d')][_0x8895('0x50')];break;case _0x8895('0x51'):_0x13488f['type']=db[_0x8895('0x4d')][_0x8895('0x52')];_0x13488f[_0x8895('0x53')]=![];break;default:}return db['sequelize'][_0x8895('0x54')][_0x8895('0x55')](_0x8895('0x56'),util['format'](_0x8895('0x57'),_0x5a5bc6['id']),_0x13488f);})[_0x8895('0x24')](function(){return _0x5a5bc6;});})['then'](respondWithResult(_0x2f81f7,0xc9))[_0x8895('0x44')](handleError(_0x2f81f7,null));};
\ No newline at end of file