Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / cmCustomField / cmCustomField.controller.js
index ab94596..cbb93e5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf6d1=['../../config/utils','../../config/environment','sendStatus','status','end','count','offset','limit','set','json','apply','save','update','then','destroy','error','name','send','index','map','CmCustomField','rawAttributes','fieldName','type','key','model','differenceBy','query','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','options','include','findAll','rows','catch','params','keys','fields','includeAll','merge','find','body','create','sequelize','transaction','Sequelize','number','INTEGER','switch','BOOLEAN','defaultValue','queryInterface','cm_contacts','format','cf_%d','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0xf6d1,0x99));var _0x1f6d=function(_0x110c3d,_0x12ee06){_0x110c3d=_0x110c3d-0x0;var _0x226d67=_0xf6d1[_0x110c3d];return _0x226d67;};'use strict';var pdf=require(_0x1f6d('0x0'));var emlformat=require(_0x1f6d('0x1'));var rimraf=require(_0x1f6d('0x2'));var zipdir=require(_0x1f6d('0x3'));var jsonpatch=require(_0x1f6d('0x4'));var rp=require(_0x1f6d('0x5'));var moment=require(_0x1f6d('0x6'));var BPromise=require('bluebird');var Mustache=require(_0x1f6d('0x7'));var util=require('util');var path=require(_0x1f6d('0x8'));var sox=require(_0x1f6d('0x9'));var csv=require(_0x1f6d('0xa'));var ejs=require(_0x1f6d('0xb'));var fs=require('fs');var _=require(_0x1f6d('0xc'));var squel=require(_0x1f6d('0xd'));var crypto=require(_0x1f6d('0xe'));var jsforce=require(_0x1f6d('0xf'));var deskjs=require(_0x1f6d('0x10'));var toCsv=require(_0x1f6d('0xa'));var querystring=require(_0x1f6d('0x11'));var Papa=require(_0x1f6d('0x12'));var Redis=require('ioredis');var authService=require(_0x1f6d('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x1f6d('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x1f6d('0x15'))(_0x1f6d('0x16'));var utils=require(_0x1f6d('0x17'));var config=require(_0x1f6d('0x18'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x45826e,_0x10975c){_0x10975c=_0x10975c||0xcc;return function(_0x1017b4){if(_0x1017b4){return _0x45826e[_0x1f6d('0x19')](_0x10975c);}return _0x45826e[_0x1f6d('0x1a')](_0x10975c)[_0x1f6d('0x1b')]();};}function respondWithResult(_0x24d3d8,_0x3d88da){_0x3d88da=_0x3d88da||0xc8;return function(_0x35d9eb){if(_0x35d9eb){return _0x24d3d8[_0x1f6d('0x1a')](_0x3d88da)['json'](_0x35d9eb);}};}function respondWithFilteredResult(_0x33f334,_0x43d3b6){return function(_0x43e1bf){if(_0x43e1bf){var _0x4fe53a=_0x43e1bf[_0x1f6d('0x1c')],_0x2b867a=_0x43d3b6[_0x1f6d('0x1d')],_0x309aa9=_0x43d3b6[_0x1f6d('0x1d')]+_0x43d3b6[_0x1f6d('0x1e')],_0x58b375;if(_0x309aa9>=_0x4fe53a){_0x309aa9=_0x4fe53a;_0x58b375=0xc8;}else{_0x58b375=0xce;}_0x33f334[_0x1f6d('0x1a')](_0x58b375);return _0x33f334[_0x1f6d('0x1f')]('Content-Range',_0x2b867a+'-'+_0x309aa9+'/'+_0x4fe53a)[_0x1f6d('0x20')](_0x43e1bf);}return null;};}function patchUpdates(_0x5cf52e){return function(_0x2cd064){try{jsonpatch[_0x1f6d('0x21')](_0x2cd064,_0x5cf52e,!![]);}catch(_0x251a17){return BPromise['reject'](_0x251a17);}return _0x2cd064[_0x1f6d('0x22')]();};}function saveUpdates(_0x19e32a,_0x4a55ae){return function(_0x4f4de4){if(_0x4f4de4){return _0x4f4de4[_0x1f6d('0x23')](_0x19e32a)[_0x1f6d('0x24')](function(_0x1beca9){return _0x1beca9;});}return null;};}function removeEntity(_0x499257,_0xeeb6d7){return function(_0x564c36){if(_0x564c36){return _0x564c36[_0x1f6d('0x25')]()[_0x1f6d('0x24')](function(){_0x499257['status'](0xcc)[_0x1f6d('0x1b')]();});}};}function handleEntityNotFound(_0x1bce2a,_0x2696de){return function(_0x4ff7f9){if(!_0x4ff7f9){_0x1bce2a[_0x1f6d('0x19')](0x194);}return _0x4ff7f9;};}function handleError(_0x46b0a8,_0x24543f){_0x24543f=_0x24543f||0x1f4;return function(_0x2cce5e){logger[_0x1f6d('0x26')](_0x2cce5e['stack']);if(_0x2cce5e['name']){delete _0x2cce5e[_0x1f6d('0x27')];}_0x46b0a8[_0x1f6d('0x1a')](_0x24543f)[_0x1f6d('0x28')](_0x2cce5e);};}exports[_0x1f6d('0x29')]=function(_0x2bdb44,_0x4750d4){var _0x180286={},_0x3718dc={},_0x31dca9={'count':0x0,'rows':[]};var _0x303113=_[_0x1f6d('0x2a')](db[_0x1f6d('0x2b')][_0x1f6d('0x2c')],function(_0x55454e){return{'name':_0x55454e[_0x1f6d('0x2d')],'type':_0x55454e[_0x1f6d('0x2e')][_0x1f6d('0x2f')]};});_0x3718dc[_0x1f6d('0x30')]=_[_0x1f6d('0x31')](_[_0x1f6d('0x2a')](_0x303113,'name'),[_0x1f6d('0x27')]);_0x3718dc['query']=_['keys'](_0x2bdb44[_0x1f6d('0x32')]);_0x3718dc[_0x1f6d('0x33')]=_[_0x1f6d('0x34')](_0x3718dc['model'],_0x3718dc[_0x1f6d('0x32')]);_0x180286['attributes']=_[_0x1f6d('0x34')](_0x3718dc[_0x1f6d('0x30')],qs['fields'](_0x2bdb44[_0x1f6d('0x32')]['fields']));_0x180286[_0x1f6d('0x35')]=_0x180286[_0x1f6d('0x35')][_0x1f6d('0x36')]?_0x180286[_0x1f6d('0x35')]:_0x3718dc[_0x1f6d('0x30')];if(!_0x2bdb44['query'][_0x1f6d('0x37')](_0x1f6d('0x38'))){_0x180286[_0x1f6d('0x1e')]=qs[_0x1f6d('0x1e')](_0x2bdb44[_0x1f6d('0x32')][_0x1f6d('0x1e')]);_0x180286['offset']=qs[_0x1f6d('0x1d')](_0x2bdb44['query'][_0x1f6d('0x1d')]);}_0x180286[_0x1f6d('0x39')]=qs[_0x1f6d('0x3a')](_0x2bdb44[_0x1f6d('0x32')][_0x1f6d('0x3a')]);_0x180286[_0x1f6d('0x3b')]=qs['filters'](_[_0x1f6d('0x3c')](_0x2bdb44[_0x1f6d('0x32')],_0x3718dc[_0x1f6d('0x33')]),_0x303113);if(_0x2bdb44['query'][_0x1f6d('0x3d')]){_0x180286[_0x1f6d('0x3b')]=_['merge'](_0x180286[_0x1f6d('0x3b')],{'$or':_[_0x1f6d('0x2a')](_0x303113,function(_0x3a34dc){if(_0x3a34dc[_0x1f6d('0x2e')]!==_0x1f6d('0x3e')){var _0x4dcc39={};_0x4dcc39[_0x3a34dc[_0x1f6d('0x27')]]={'$like':'%'+_0x2bdb44[_0x1f6d('0x32')]['filter']+'%'};return _0x4dcc39;}})});}_0x180286=_['merge']({},_0x180286,_0x2bdb44[_0x1f6d('0x3f')]);var _0x51cb14={'where':_0x180286[_0x1f6d('0x3b')]};return db[_0x1f6d('0x2b')][_0x1f6d('0x1c')](_0x51cb14)[_0x1f6d('0x24')](function(_0xf8d8a1){_0x31dca9['count']=_0xf8d8a1;if(_0x2bdb44[_0x1f6d('0x32')]['includeAll']){_0x180286[_0x1f6d('0x40')]=[{'all':!![]}];}return db[_0x1f6d('0x2b')][_0x1f6d('0x41')](_0x180286);})[_0x1f6d('0x24')](function(_0x4e146e){_0x31dca9[_0x1f6d('0x42')]=_0x4e146e;return _0x31dca9;})[_0x1f6d('0x24')](respondWithFilteredResult(_0x4750d4,_0x180286))[_0x1f6d('0x43')](handleError(_0x4750d4,null));};exports['show']=function(_0x52e0c9,_0x457f33){var _0x13629c={'raw':!![],'where':{'id':_0x52e0c9[_0x1f6d('0x44')]['id']}},_0x858520={};_0x858520[_0x1f6d('0x30')]=_[_0x1f6d('0x45')](db[_0x1f6d('0x2b')][_0x1f6d('0x2c')]);_0x858520[_0x1f6d('0x32')]=_[_0x1f6d('0x45')](_0x52e0c9[_0x1f6d('0x32')]);_0x858520['filters']=_['intersection'](_0x858520[_0x1f6d('0x30')],_0x858520[_0x1f6d('0x32')]);_0x13629c[_0x1f6d('0x35')]=_[_0x1f6d('0x34')](_0x858520[_0x1f6d('0x30')],qs[_0x1f6d('0x46')](_0x52e0c9[_0x1f6d('0x32')][_0x1f6d('0x46')]));_0x13629c[_0x1f6d('0x35')]=_0x13629c[_0x1f6d('0x35')][_0x1f6d('0x36')]?_0x13629c[_0x1f6d('0x35')]:_0x858520['model'];if(_0x52e0c9[_0x1f6d('0x32')][_0x1f6d('0x47')]){_0x13629c[_0x1f6d('0x40')]=[{'all':!![]}];}_0x13629c=_[_0x1f6d('0x48')]({},_0x13629c,_0x52e0c9[_0x1f6d('0x3f')]);return db[_0x1f6d('0x2b')][_0x1f6d('0x49')](_0x13629c)[_0x1f6d('0x24')](handleEntityNotFound(_0x457f33,null))['then'](respondWithResult(_0x457f33,null))['catch'](handleError(_0x457f33,null));};exports[_0x1f6d('0x23')]=function(_0x2c05fb,_0xe6c516){if(_0x2c05fb['body']['id']){delete _0x2c05fb['body']['id'];}return db['CmCustomField'][_0x1f6d('0x49')]({'where':{'id':_0x2c05fb[_0x1f6d('0x44')]['id']}})['then'](handleEntityNotFound(_0xe6c516,null))[_0x1f6d('0x24')](saveUpdates(_0x2c05fb[_0x1f6d('0x4a')],null))[_0x1f6d('0x24')](respondWithResult(_0xe6c516,null))[_0x1f6d('0x43')](handleError(_0xe6c516,null));};exports[_0x1f6d('0x25')]=function(_0x2d1225,_0x1fc50b){return db[_0x1f6d('0x2b')][_0x1f6d('0x49')]({'where':{'id':_0x2d1225['params']['id']}})[_0x1f6d('0x24')](handleEntityNotFound(_0x1fc50b,null))[_0x1f6d('0x24')](removeEntity(_0x1fc50b,null))['catch'](handleError(_0x1fc50b,null));};exports[_0x1f6d('0x4b')]=function(_0x3d9585,_0x2d012f){var _0x4a7e2b;return db[_0x1f6d('0x4c')][_0x1f6d('0x4d')](function(_0x2b9871){return db[_0x1f6d('0x2b')][_0x1f6d('0x4b')](_0x3d9585[_0x1f6d('0x4a')],{'transaction':_0x2b9871})[_0x1f6d('0x24')](function(_0x2cd751){_0x4a7e2b=_0x2cd751;var _0x121992={'type':db[_0x1f6d('0x4e')]['TEXT'],'transaction':_0x2b9871};switch(_0x3d9585['body']['type']){case'text':_0x121992[_0x1f6d('0x2e')]=db[_0x1f6d('0x4e')]['TEXT'];break;case _0x1f6d('0x4f'):_0x121992[_0x1f6d('0x2e')]=db['Sequelize'][_0x1f6d('0x50')];break;case _0x1f6d('0x51'):_0x121992['type']=db[_0x1f6d('0x4e')][_0x1f6d('0x52')];_0x121992[_0x1f6d('0x53')]=![];break;default:}return db[_0x1f6d('0x4c')][_0x1f6d('0x54')]['addColumn'](_0x1f6d('0x55'),util[_0x1f6d('0x56')](_0x1f6d('0x57'),_0x4a7e2b['id']),_0x121992);})[_0x1f6d('0x24')](function(){return _0x4a7e2b;});})[_0x1f6d('0x24')](respondWithResult(_0x2d012f,0xc9))[_0x1f6d('0x43')](handleError(_0x2d012f,null));};
\ No newline at end of file
+var _0x30f6=['status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','error','stack','name','send','index','CmCustomField','model','differenceBy','map','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','keys','rawAttributes','find','body','sequelize','transaction','create','Sequelize','TEXT','text','number','switch','BOOLEAN','defaultValue','queryInterface','addColumn','cm_contacts','format','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus'];(function(_0x53da6c,_0x5930d4){var _0x33c828=function(_0x4f8960){while(--_0x4f8960){_0x53da6c['push'](_0x53da6c['shift']());}};_0x33c828(++_0x5930d4);}(_0x30f6,0x1ac));var _0x630f=function(_0x44d5b7,_0x38c266){_0x44d5b7=_0x44d5b7-0x0;var _0x44f102=_0x30f6[_0x44d5b7];return _0x44f102;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x630f('0x0'));var rp=require(_0x630f('0x1'));var moment=require(_0x630f('0x2'));var BPromise=require(_0x630f('0x3'));var Mustache=require(_0x630f('0x4'));var util=require('util');var path=require(_0x630f('0x5'));var sox=require(_0x630f('0x6'));var csv=require(_0x630f('0x7'));var ejs=require(_0x630f('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x630f('0x9'));var squel=require(_0x630f('0xa'));var crypto=require(_0x630f('0xb'));var jsforce=require(_0x630f('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x630f('0x7'));var querystring=require(_0x630f('0xd'));var Papa=require(_0x630f('0xe'));var Redis=require(_0x630f('0xf'));var authService=require(_0x630f('0x10'));var qs=require(_0x630f('0x11'));var as=require(_0x630f('0x12'));var hardwareService=require(_0x630f('0x13'));var logger=require(_0x630f('0x14'))(_0x630f('0x15'));var utils=require(_0x630f('0x16'));var config=require(_0x630f('0x17'));var licenseUtil=require(_0x630f('0x18'));var db=require(_0x630f('0x19'))['db'];function respondWithStatusCode(_0x57e526,_0x423506){_0x423506=_0x423506||0xcc;return function(_0x1dba7a){if(_0x1dba7a){return _0x57e526[_0x630f('0x1a')](_0x423506);}return _0x57e526[_0x630f('0x1b')](_0x423506)[_0x630f('0x1c')]();};}function respondWithResult(_0x2ae8dd,_0x59b8d6){_0x59b8d6=_0x59b8d6||0xc8;return function(_0x22f169){if(_0x22f169){return _0x2ae8dd[_0x630f('0x1b')](_0x59b8d6)[_0x630f('0x1d')](_0x22f169);}};}function respondWithFilteredResult(_0x58ff40,_0x5ac35c){return function(_0x839b32){if(_0x839b32){var _0x1ea237=typeof _0x5ac35c[_0x630f('0x1e')]===_0x630f('0x1f')&&typeof _0x5ac35c[_0x630f('0x20')]==='undefined';var _0x46c747=_0x839b32[_0x630f('0x21')];var _0x1388ef=_0x1ea237?0x0:_0x5ac35c[_0x630f('0x1e')];var _0x18ca93=_0x1ea237?_0x839b32[_0x630f('0x21')]:_0x5ac35c[_0x630f('0x1e')]+_0x5ac35c['limit'];var _0x383951;if(_0x18ca93>=_0x46c747){_0x18ca93=_0x46c747;_0x383951=0xc8;}else{_0x383951=0xce;}_0x58ff40['status'](_0x383951);return _0x58ff40[_0x630f('0x22')](_0x630f('0x23'),_0x1388ef+'-'+_0x18ca93+'/'+_0x46c747)[_0x630f('0x1d')](_0x839b32);}return null;};}function patchUpdates(_0x81f344){return function(_0xd9480e){try{jsonpatch[_0x630f('0x24')](_0xd9480e,_0x81f344,!![]);}catch(_0x136fd6){return BPromise[_0x630f('0x25')](_0x136fd6);}return _0xd9480e[_0x630f('0x26')]();};}function saveUpdates(_0x21e04c,_0x396a58){return function(_0x6cf7b8){if(_0x6cf7b8){return _0x6cf7b8[_0x630f('0x27')](_0x21e04c)[_0x630f('0x28')](function(_0x45d171){return _0x45d171;});}return null;};}function removeEntity(_0x3bd679,_0x1aa7dc){return function(_0x4912d6){if(_0x4912d6){return _0x4912d6['destroy']()[_0x630f('0x28')](function(){_0x3bd679[_0x630f('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3a0c54,_0xbd296a){return function(_0x3c0035){if(!_0x3c0035){_0x3a0c54[_0x630f('0x1a')](0x194);}return _0x3c0035;};}function handleError(_0x1add50,_0x3642f0){_0x3642f0=_0x3642f0||0x1f4;return function(_0x529737){logger[_0x630f('0x29')](_0x529737[_0x630f('0x2a')]);if(_0x529737['name']){delete _0x529737[_0x630f('0x2b')];}_0x1add50[_0x630f('0x1b')](_0x3642f0)[_0x630f('0x2c')](_0x529737);};}exports[_0x630f('0x2d')]=function(_0x20fe4c,_0x4e5b6d){var _0x20392e={},_0x190703={},_0x194e6b={'count':0x0,'rows':[]};var _0x20eba5=_['map'](db[_0x630f('0x2e')]['rawAttributes'],function(_0x1a9d05){return{'name':_0x1a9d05['fieldName'],'type':_0x1a9d05['type']['key']};});_0x190703[_0x630f('0x2f')]=_[_0x630f('0x30')](_[_0x630f('0x31')](_0x20eba5,'name'),[_0x630f('0x2b')]);_0x190703[_0x630f('0x32')]=_['keys'](_0x20fe4c[_0x630f('0x32')]);_0x190703[_0x630f('0x33')]=_[_0x630f('0x34')](_0x190703[_0x630f('0x2f')],_0x190703[_0x630f('0x32')]);_0x20392e['attributes']=_[_0x630f('0x34')](_0x190703[_0x630f('0x2f')],qs['fields'](_0x20fe4c['query'][_0x630f('0x35')]));_0x20392e[_0x630f('0x36')]=_0x20392e[_0x630f('0x36')][_0x630f('0x37')]?_0x20392e[_0x630f('0x36')]:_0x190703[_0x630f('0x2f')];if(!_0x20fe4c[_0x630f('0x32')][_0x630f('0x38')](_0x630f('0x39'))){_0x20392e[_0x630f('0x20')]=qs[_0x630f('0x20')](_0x20fe4c[_0x630f('0x32')][_0x630f('0x20')]);_0x20392e[_0x630f('0x1e')]=qs['offset'](_0x20fe4c[_0x630f('0x32')][_0x630f('0x1e')]);}_0x20392e[_0x630f('0x3a')]=qs[_0x630f('0x3b')](_0x20fe4c['query'][_0x630f('0x3b')]);_0x20392e[_0x630f('0x3c')]=qs[_0x630f('0x33')](_['pick'](_0x20fe4c[_0x630f('0x32')],_0x190703[_0x630f('0x33')]),_0x20eba5);if(_0x20fe4c[_0x630f('0x32')][_0x630f('0x3d')]){_0x20392e['where']=_[_0x630f('0x3e')](_0x20392e['where'],{'$or':_[_0x630f('0x31')](_0x20eba5,function(_0x5f8b1d){if(_0x5f8b1d[_0x630f('0x3f')]!==_0x630f('0x40')){var _0x150904={};_0x150904[_0x5f8b1d[_0x630f('0x2b')]]={'$like':'%'+_0x20fe4c[_0x630f('0x32')][_0x630f('0x3d')]+'%'};return _0x150904;}})});}_0x20392e=_[_0x630f('0x3e')]({},_0x20392e,_0x20fe4c[_0x630f('0x41')]);var _0x3f6e7e={'where':_0x20392e['where']};return db[_0x630f('0x2e')][_0x630f('0x21')](_0x3f6e7e)[_0x630f('0x28')](function(_0x3e7e82){_0x194e6b['count']=_0x3e7e82;if(_0x20fe4c[_0x630f('0x32')][_0x630f('0x42')]){_0x20392e[_0x630f('0x43')]=[{'all':!![]}];}return db[_0x630f('0x2e')][_0x630f('0x44')](_0x20392e);})[_0x630f('0x28')](function(_0x4c422e){_0x194e6b[_0x630f('0x45')]=_0x4c422e;return _0x194e6b;})[_0x630f('0x28')](respondWithFilteredResult(_0x4e5b6d,_0x20392e))[_0x630f('0x46')](handleError(_0x4e5b6d,null));};exports[_0x630f('0x47')]=function(_0x43e27f,_0x341709){var _0x29c50c={'raw':!![],'where':{'id':_0x43e27f[_0x630f('0x48')]['id']}},_0x296fac={};_0x296fac[_0x630f('0x2f')]=_[_0x630f('0x49')](db[_0x630f('0x2e')][_0x630f('0x4a')]);_0x296fac[_0x630f('0x32')]=_[_0x630f('0x49')](_0x43e27f[_0x630f('0x32')]);_0x296fac['filters']=_[_0x630f('0x34')](_0x296fac[_0x630f('0x2f')],_0x296fac['query']);_0x29c50c[_0x630f('0x36')]=_[_0x630f('0x34')](_0x296fac[_0x630f('0x2f')],qs[_0x630f('0x35')](_0x43e27f[_0x630f('0x32')][_0x630f('0x35')]));_0x29c50c[_0x630f('0x36')]=_0x29c50c['attributes']['length']?_0x29c50c[_0x630f('0x36')]:_0x296fac['model'];if(_0x43e27f[_0x630f('0x32')][_0x630f('0x42')]){_0x29c50c[_0x630f('0x43')]=[{'all':!![]}];}_0x29c50c=_['merge']({},_0x29c50c,_0x43e27f[_0x630f('0x41')]);return db[_0x630f('0x2e')][_0x630f('0x4b')](_0x29c50c)[_0x630f('0x28')](handleEntityNotFound(_0x341709,null))[_0x630f('0x28')](respondWithResult(_0x341709,null))[_0x630f('0x46')](handleError(_0x341709,null));};exports['update']=function(_0xfe7452,_0x5a854c){if(_0xfe7452[_0x630f('0x4c')]['id']){delete _0xfe7452[_0x630f('0x4c')]['id'];}return db[_0x630f('0x2e')][_0x630f('0x4b')]({'where':{'id':_0xfe7452['params']['id']}})[_0x630f('0x28')](handleEntityNotFound(_0x5a854c,null))['then'](saveUpdates(_0xfe7452[_0x630f('0x4c')],null))[_0x630f('0x28')](respondWithResult(_0x5a854c,null))['catch'](handleError(_0x5a854c,null));};exports['destroy']=function(_0x321d4e,_0x4972bb){return db[_0x630f('0x2e')][_0x630f('0x4b')]({'where':{'id':_0x321d4e['params']['id']}})['then'](handleEntityNotFound(_0x4972bb,null))[_0x630f('0x28')](removeEntity(_0x4972bb,null))[_0x630f('0x46')](handleError(_0x4972bb,null));};exports['create']=function(_0x4d8848,_0x16ce9b){var _0x40dce3;return db[_0x630f('0x4d')][_0x630f('0x4e')](function(_0xa2ed82){return db[_0x630f('0x2e')][_0x630f('0x4f')](_0x4d8848[_0x630f('0x4c')],{'transaction':_0xa2ed82})['then'](function(_0x4b2683){_0x40dce3=_0x4b2683;var _0x1f78a4={'type':db[_0x630f('0x50')][_0x630f('0x51')],'transaction':_0xa2ed82};switch(_0x4d8848['body']['type']){case _0x630f('0x52'):_0x1f78a4[_0x630f('0x3f')]=db[_0x630f('0x50')][_0x630f('0x51')];break;case _0x630f('0x53'):_0x1f78a4[_0x630f('0x3f')]=db[_0x630f('0x50')]['INTEGER'];break;case _0x630f('0x54'):_0x1f78a4[_0x630f('0x3f')]=db['Sequelize'][_0x630f('0x55')];_0x1f78a4[_0x630f('0x56')]=![];break;default:}return db[_0x630f('0x4d')][_0x630f('0x57')][_0x630f('0x58')](_0x630f('0x59'),util[_0x630f('0x5a')]('cf_%d',_0x40dce3['id']),_0x1f78a4);})[_0x630f('0x28')](function(){return _0x40dce3;});})[_0x630f('0x28')](respondWithResult(_0x16ce9b,0xc9))[_0x630f('0x46')](handleError(_0x16ce9b,null));};
\ No newline at end of file