Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / cmCustomField / cmCustomField.controller.js
index 18576c7..cbb93e5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb396=['sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','save','then','destroy','error','name','index','CmCustomField','rawAttributes','type','key','model','differenceBy','map','keys','query','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','includeAll','include','findAll','rows','catch','show','update','params','body','find','create','sequelize','Sequelize','TEXT','text','number','INTEGER','switch','BOOLEAN','defaultValue','queryInterface','cm_contacts','format','cf_%d','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','ejs','lodash','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../config/logger','../../config/license/util','../../mysqldb'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb396,0x1e8));var _0x6b39=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xb396[_0x14add3];return _0x4a174f;};'use strict';var emlformat=require(_0x6b39('0x0'));var rimraf=require(_0x6b39('0x1'));var zipdir=require(_0x6b39('0x2'));var jsonpatch=require(_0x6b39('0x3'));var rp=require('request-promise');var moment=require(_0x6b39('0x4'));var BPromise=require(_0x6b39('0x5'));var Mustache=require(_0x6b39('0x6'));var util=require(_0x6b39('0x7'));var path=require(_0x6b39('0x8'));var sox=require(_0x6b39('0x9'));var csv=require('to-csv');var ejs=require(_0x6b39('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x6b39('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x6b39('0xc'));var deskjs=require(_0x6b39('0xd'));var toCsv=require(_0x6b39('0xe'));var querystring=require(_0x6b39('0xf'));var Papa=require(_0x6b39('0x10'));var Redis=require(_0x6b39('0x11'));var authService=require(_0x6b39('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x6b39('0x13'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x6b39('0x14'));var db=require(_0x6b39('0x15'))['db'];function respondWithStatusCode(_0x513855,_0x51ba26){_0x51ba26=_0x51ba26||0xcc;return function(_0x14aeea){if(_0x14aeea){return _0x513855[_0x6b39('0x16')](_0x51ba26);}return _0x513855[_0x6b39('0x17')](_0x51ba26)[_0x6b39('0x18')]();};}function respondWithResult(_0x104167,_0x53ed1e){_0x53ed1e=_0x53ed1e||0xc8;return function(_0x3d12b0){if(_0x3d12b0){return _0x104167['status'](_0x53ed1e)[_0x6b39('0x19')](_0x3d12b0);}};}function respondWithFilteredResult(_0x18c3c7,_0x2b190b){return function(_0x49277f){if(_0x49277f){var _0x84b853=typeof _0x2b190b['offset']===_0x6b39('0x1a')&&typeof _0x2b190b[_0x6b39('0x1b')]===_0x6b39('0x1a');var _0x14b2cf=_0x49277f[_0x6b39('0x1c')];var _0x38dcd4=_0x84b853?0x0:_0x2b190b[_0x6b39('0x1d')];var _0x1cd916=_0x84b853?_0x49277f['count']:_0x2b190b['offset']+_0x2b190b[_0x6b39('0x1b')];var _0x217527;if(_0x1cd916>=_0x14b2cf){_0x1cd916=_0x14b2cf;_0x217527=0xc8;}else{_0x217527=0xce;}_0x18c3c7[_0x6b39('0x17')](_0x217527);return _0x18c3c7[_0x6b39('0x1e')](_0x6b39('0x1f'),_0x38dcd4+'-'+_0x1cd916+'/'+_0x14b2cf)[_0x6b39('0x19')](_0x49277f);}return null;};}function patchUpdates(_0x458e7d){return function(_0x560024){try{jsonpatch[_0x6b39('0x20')](_0x560024,_0x458e7d,!![]);}catch(_0x23aab1){return BPromise['reject'](_0x23aab1);}return _0x560024[_0x6b39('0x21')]();};}function saveUpdates(_0x39502d,_0x3b7250){return function(_0x19e40f){if(_0x19e40f){return _0x19e40f['update'](_0x39502d)[_0x6b39('0x22')](function(_0x4a4bc4){return _0x4a4bc4;});}return null;};}function removeEntity(_0x5c2be5,_0x6fd12){return function(_0x2e4fbf){if(_0x2e4fbf){return _0x2e4fbf[_0x6b39('0x23')]()['then'](function(){_0x5c2be5['status'](0xcc)[_0x6b39('0x18')]();});}};}function handleEntityNotFound(_0x49ac9b,_0xd3a560){return function(_0x2423bb){if(!_0x2423bb){_0x49ac9b[_0x6b39('0x16')](0x194);}return _0x2423bb;};}function handleError(_0x512215,_0x8a5812){_0x8a5812=_0x8a5812||0x1f4;return function(_0x517d16){logger[_0x6b39('0x24')](_0x517d16['stack']);if(_0x517d16[_0x6b39('0x25')]){delete _0x517d16[_0x6b39('0x25')];}_0x512215[_0x6b39('0x17')](_0x8a5812)['send'](_0x517d16);};}exports[_0x6b39('0x26')]=function(_0x26ef5b,_0x2e2e8d){var _0x47bad3={},_0x1689fb={},_0x2fa81a={'count':0x0,'rows':[]};var _0x427a7b=_['map'](db[_0x6b39('0x27')][_0x6b39('0x28')],function(_0x341ddb){return{'name':_0x341ddb['fieldName'],'type':_0x341ddb[_0x6b39('0x29')][_0x6b39('0x2a')]};});_0x1689fb[_0x6b39('0x2b')]=_[_0x6b39('0x2c')](_[_0x6b39('0x2d')](_0x427a7b,_0x6b39('0x25')),[_0x6b39('0x25')]);_0x1689fb['query']=_[_0x6b39('0x2e')](_0x26ef5b[_0x6b39('0x2f')]);_0x1689fb['filters']=_[_0x6b39('0x30')](_0x1689fb[_0x6b39('0x2b')],_0x1689fb[_0x6b39('0x2f')]);_0x47bad3[_0x6b39('0x31')]=_[_0x6b39('0x30')](_0x1689fb[_0x6b39('0x2b')],qs['fields'](_0x26ef5b[_0x6b39('0x2f')][_0x6b39('0x32')]));_0x47bad3[_0x6b39('0x31')]=_0x47bad3[_0x6b39('0x31')]['length']?_0x47bad3[_0x6b39('0x31')]:_0x1689fb[_0x6b39('0x2b')];if(!_0x26ef5b[_0x6b39('0x2f')][_0x6b39('0x33')](_0x6b39('0x34'))){_0x47bad3[_0x6b39('0x1b')]=qs[_0x6b39('0x1b')](_0x26ef5b[_0x6b39('0x2f')][_0x6b39('0x1b')]);_0x47bad3['offset']=qs['offset'](_0x26ef5b[_0x6b39('0x2f')][_0x6b39('0x1d')]);}_0x47bad3[_0x6b39('0x35')]=qs['sort'](_0x26ef5b['query'][_0x6b39('0x36')]);_0x47bad3[_0x6b39('0x37')]=qs[_0x6b39('0x38')](_[_0x6b39('0x39')](_0x26ef5b[_0x6b39('0x2f')],_0x1689fb[_0x6b39('0x38')]),_0x427a7b);if(_0x26ef5b['query'][_0x6b39('0x3a')]){_0x47bad3[_0x6b39('0x37')]=_[_0x6b39('0x3b')](_0x47bad3[_0x6b39('0x37')],{'$or':_['map'](_0x427a7b,function(_0x72e6b6){if(_0x72e6b6[_0x6b39('0x29')]!==_0x6b39('0x3c')){var _0x30d009={};_0x30d009[_0x72e6b6[_0x6b39('0x25')]]={'$like':'%'+_0x26ef5b[_0x6b39('0x2f')][_0x6b39('0x3a')]+'%'};return _0x30d009;}})});}_0x47bad3=_[_0x6b39('0x3b')]({},_0x47bad3,_0x26ef5b['options']);var _0x5ecebb={'where':_0x47bad3[_0x6b39('0x37')]};return db['CmCustomField'][_0x6b39('0x1c')](_0x5ecebb)[_0x6b39('0x22')](function(_0x86456f){_0x2fa81a[_0x6b39('0x1c')]=_0x86456f;if(_0x26ef5b[_0x6b39('0x2f')][_0x6b39('0x3d')]){_0x47bad3[_0x6b39('0x3e')]=[{'all':!![]}];}return db['CmCustomField'][_0x6b39('0x3f')](_0x47bad3);})[_0x6b39('0x22')](function(_0x42c31e){_0x2fa81a[_0x6b39('0x40')]=_0x42c31e;return _0x2fa81a;})[_0x6b39('0x22')](respondWithFilteredResult(_0x2e2e8d,_0x47bad3))[_0x6b39('0x41')](handleError(_0x2e2e8d,null));};exports[_0x6b39('0x42')]=function(_0x4d7390,_0x45c70b){var _0x32cca6={'raw':!![],'where':{'id':_0x4d7390['params']['id']}},_0x16c777={};_0x16c777[_0x6b39('0x2b')]=_[_0x6b39('0x2e')](db[_0x6b39('0x27')][_0x6b39('0x28')]);_0x16c777[_0x6b39('0x2f')]=_[_0x6b39('0x2e')](_0x4d7390[_0x6b39('0x2f')]);_0x16c777[_0x6b39('0x38')]=_['intersection'](_0x16c777[_0x6b39('0x2b')],_0x16c777[_0x6b39('0x2f')]);_0x32cca6[_0x6b39('0x31')]=_[_0x6b39('0x30')](_0x16c777[_0x6b39('0x2b')],qs[_0x6b39('0x32')](_0x4d7390['query'][_0x6b39('0x32')]));_0x32cca6[_0x6b39('0x31')]=_0x32cca6['attributes']['length']?_0x32cca6[_0x6b39('0x31')]:_0x16c777[_0x6b39('0x2b')];if(_0x4d7390[_0x6b39('0x2f')][_0x6b39('0x3d')]){_0x32cca6[_0x6b39('0x3e')]=[{'all':!![]}];}_0x32cca6=_[_0x6b39('0x3b')]({},_0x32cca6,_0x4d7390['options']);return db[_0x6b39('0x27')]['find'](_0x32cca6)[_0x6b39('0x22')](handleEntityNotFound(_0x45c70b,null))['then'](respondWithResult(_0x45c70b,null))[_0x6b39('0x41')](handleError(_0x45c70b,null));};exports[_0x6b39('0x43')]=function(_0x479a97,_0x4c6339){if(_0x479a97['body']['id']){delete _0x479a97['body']['id'];}return db[_0x6b39('0x27')]['find']({'where':{'id':_0x479a97[_0x6b39('0x44')]['id']}})[_0x6b39('0x22')](handleEntityNotFound(_0x4c6339,null))[_0x6b39('0x22')](saveUpdates(_0x479a97[_0x6b39('0x45')],null))[_0x6b39('0x22')](respondWithResult(_0x4c6339,null))[_0x6b39('0x41')](handleError(_0x4c6339,null));};exports['destroy']=function(_0x27a4bf,_0x2de7ac){return db[_0x6b39('0x27')][_0x6b39('0x46')]({'where':{'id':_0x27a4bf[_0x6b39('0x44')]['id']}})['then'](handleEntityNotFound(_0x2de7ac,null))['then'](removeEntity(_0x2de7ac,null))[_0x6b39('0x41')](handleError(_0x2de7ac,null));};exports[_0x6b39('0x47')]=function(_0x234f83,_0x2864f3){var _0x3f0cd9;return db[_0x6b39('0x48')]['transaction'](function(_0x35795c){return db[_0x6b39('0x27')][_0x6b39('0x47')](_0x234f83[_0x6b39('0x45')],{'transaction':_0x35795c})['then'](function(_0x56bf8f){_0x3f0cd9=_0x56bf8f;var _0x3ce7bb={'type':db[_0x6b39('0x49')][_0x6b39('0x4a')],'transaction':_0x35795c};switch(_0x234f83[_0x6b39('0x45')][_0x6b39('0x29')]){case _0x6b39('0x4b'):_0x3ce7bb[_0x6b39('0x29')]=db[_0x6b39('0x49')][_0x6b39('0x4a')];break;case _0x6b39('0x4c'):_0x3ce7bb[_0x6b39('0x29')]=db['Sequelize'][_0x6b39('0x4d')];break;case _0x6b39('0x4e'):_0x3ce7bb[_0x6b39('0x29')]=db['Sequelize'][_0x6b39('0x4f')];_0x3ce7bb[_0x6b39('0x50')]=![];break;default:}return db['sequelize'][_0x6b39('0x51')]['addColumn'](_0x6b39('0x52'),util[_0x6b39('0x53')](_0x6b39('0x54'),_0x3f0cd9['id']),_0x3ce7bb);})[_0x6b39('0x22')](function(){return _0x3f0cd9;});})[_0x6b39('0x22')](respondWithResult(_0x2864f3,0xc9))['catch'](handleError(_0x2864f3,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