Built motion from commit 497d3d92.|2.5.43
[motion2.git] / server / api / squareReportDetail / squareReportDetail.controller.js
index 5228e34..51e688c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfe9c=['query','intersection','fields','length','nolimit','order','sort','filters','filter','where','merge','type','options','findAll','rows','show','keys','attributes','includeAll','find','create','body','params','catch','describe','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','papaparse','ioredis','../../components/auth/service','../../config/logger','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','reject','update','then','destroy','end','stack','name','send','index','map','SquareDetailsReport','rawAttributes','fieldName','model'];(function(_0x3496c3,_0x4c3221){var _0x39878c=function(_0x30cc51){while(--_0x30cc51){_0x3496c3['push'](_0x3496c3['shift']());}};_0x39878c(++_0x4c3221);}(_0xfe9c,0x12d));var _0xcfe9=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0xfe9c[_0x432682];return _0x463d05;};'use strict';var emlformat=require(_0xcfe9('0x0'));var rimraf=require(_0xcfe9('0x1'));var zipdir=require(_0xcfe9('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xcfe9('0x3'));var moment=require('moment');var BPromise=require(_0xcfe9('0x4'));var Mustache=require(_0xcfe9('0x5'));var util=require(_0xcfe9('0x6'));var path=require(_0xcfe9('0x7'));var sox=require(_0xcfe9('0x8'));var csv=require(_0xcfe9('0x9'));var ejs=require(_0xcfe9('0xa'));var fs=require('fs');var fs_extra=require(_0xcfe9('0xb'));var _=require(_0xcfe9('0xc'));var squel=require(_0xcfe9('0xd'));var crypto=require('crypto');var jsforce=require(_0xcfe9('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xcfe9('0x9'));var querystring=require('querystring');var Papa=require(_0xcfe9('0xf'));var Redis=require(_0xcfe9('0x10'));var authService=require(_0xcfe9('0x11'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xcfe9('0x12'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xcfe9('0x13'));var db=require(_0xcfe9('0x14'))['db'];function respondWithStatusCode(_0x22c83c,_0x16b1c0){_0x16b1c0=_0x16b1c0||0xcc;return function(_0x3767cd){if(_0x3767cd){return _0x22c83c[_0xcfe9('0x15')](_0x16b1c0);}return _0x22c83c['status'](_0x16b1c0)['end']();};}function respondWithResult(_0x221089,_0x1387dd){_0x1387dd=_0x1387dd||0xc8;return function(_0x45eab0){if(_0x45eab0){return _0x221089[_0xcfe9('0x16')](_0x1387dd)[_0xcfe9('0x17')](_0x45eab0);}};}function respondWithFilteredResult(_0x2756b9,_0x183e21){return function(_0x4411ff){if(_0x4411ff){var _0x32ad1c=typeof _0x183e21[_0xcfe9('0x18')]===_0xcfe9('0x19')&&typeof _0x183e21[_0xcfe9('0x1a')]===_0xcfe9('0x19');var _0x510eb4=_0x4411ff[_0xcfe9('0x1b')];var _0x2203c5=_0x32ad1c?0x0:_0x183e21[_0xcfe9('0x18')];var _0x355eaf=_0x32ad1c?_0x4411ff[_0xcfe9('0x1b')]:_0x183e21[_0xcfe9('0x18')]+_0x183e21[_0xcfe9('0x1a')];var _0x202cbb;if(_0x355eaf>=_0x510eb4){_0x355eaf=_0x510eb4;_0x202cbb=0xc8;}else{_0x202cbb=0xce;}_0x2756b9['status'](_0x202cbb);return _0x2756b9[_0xcfe9('0x1c')](_0xcfe9('0x1d'),_0x2203c5+'-'+_0x355eaf+'/'+_0x510eb4)[_0xcfe9('0x17')](_0x4411ff);}return null;};}function patchUpdates(_0x3e3565){return function(_0x3ef8b1){try{jsonpatch['apply'](_0x3ef8b1,_0x3e3565,!![]);}catch(_0x14d500){return BPromise[_0xcfe9('0x1e')](_0x14d500);}return _0x3ef8b1['save']();};}function saveUpdates(_0x5ad595,_0x1d5cac){return function(_0x31c0bc){if(_0x31c0bc){return _0x31c0bc[_0xcfe9('0x1f')](_0x5ad595)[_0xcfe9('0x20')](function(_0x58bfd7){return _0x58bfd7;});}return null;};}function removeEntity(_0x476e7d,_0x375cdb){return function(_0x513f82){if(_0x513f82){return _0x513f82[_0xcfe9('0x21')]()['then'](function(){_0x476e7d[_0xcfe9('0x16')](0xcc)[_0xcfe9('0x22')]();});}};}function handleEntityNotFound(_0xdf53b9,_0x4520b6){return function(_0xe566d7){if(!_0xe566d7){_0xdf53b9[_0xcfe9('0x15')](0x194);}return _0xe566d7;};}function handleError(_0x52ee2d,_0x1e8605){_0x1e8605=_0x1e8605||0x1f4;return function(_0x5ef739){logger['error'](_0x5ef739[_0xcfe9('0x23')]);if(_0x5ef739[_0xcfe9('0x24')]){delete _0x5ef739[_0xcfe9('0x24')];}_0x52ee2d[_0xcfe9('0x16')](_0x1e8605)[_0xcfe9('0x25')](_0x5ef739);};}exports[_0xcfe9('0x26')]=function(_0x10c6cf,_0x2bcb90){var _0x3fbc5f={},_0x1467cb={},_0x639681={'count':0x0,'rows':[]};var _0x4436f7=_[_0xcfe9('0x27')](db[_0xcfe9('0x28')][_0xcfe9('0x29')],function(_0x7e1b06){return{'name':_0x7e1b06[_0xcfe9('0x2a')],'type':_0x7e1b06['type']['key']};});_0x1467cb[_0xcfe9('0x2b')]=_[_0xcfe9('0x27')](_0x4436f7,_0xcfe9('0x24'));_0x1467cb[_0xcfe9('0x2c')]=_['keys'](_0x10c6cf[_0xcfe9('0x2c')]);_0x1467cb['filters']=_[_0xcfe9('0x2d')](_0x1467cb['model'],_0x1467cb['query']);_0x3fbc5f['attributes']=_[_0xcfe9('0x2d')](_0x1467cb['model'],qs[_0xcfe9('0x2e')](_0x10c6cf[_0xcfe9('0x2c')][_0xcfe9('0x2e')]));_0x3fbc5f['attributes']=_0x3fbc5f['attributes'][_0xcfe9('0x2f')]?_0x3fbc5f['attributes']:_0x1467cb[_0xcfe9('0x2b')];if(!_0x10c6cf[_0xcfe9('0x2c')]['hasOwnProperty'](_0xcfe9('0x30'))){_0x3fbc5f[_0xcfe9('0x1a')]=qs[_0xcfe9('0x1a')](_0x10c6cf[_0xcfe9('0x2c')][_0xcfe9('0x1a')]);_0x3fbc5f['offset']=qs[_0xcfe9('0x18')](_0x10c6cf[_0xcfe9('0x2c')][_0xcfe9('0x18')]);}_0x3fbc5f[_0xcfe9('0x31')]=qs[_0xcfe9('0x32')](_0x10c6cf[_0xcfe9('0x2c')][_0xcfe9('0x32')]);_0x3fbc5f['where']=qs['filters'](_['pick'](_0x10c6cf[_0xcfe9('0x2c')],_0x1467cb[_0xcfe9('0x33')]),_0x4436f7);if(_0x10c6cf[_0xcfe9('0x2c')][_0xcfe9('0x34')]){_0x3fbc5f[_0xcfe9('0x35')]=_[_0xcfe9('0x36')](_0x3fbc5f[_0xcfe9('0x35')],{'$or':_[_0xcfe9('0x27')](_0x4436f7,function(_0x25188c){if(_0x25188c[_0xcfe9('0x37')]!=='VIRTUAL'){var _0x5bc59e={};_0x5bc59e[_0x25188c['name']]={'$like':'%'+_0x10c6cf[_0xcfe9('0x2c')][_0xcfe9('0x34')]+'%'};return _0x5bc59e;}})});}_0x3fbc5f=_[_0xcfe9('0x36')]({},_0x3fbc5f,_0x10c6cf[_0xcfe9('0x38')]);var _0x397e26={'where':_0x3fbc5f['where']};return db[_0xcfe9('0x28')]['count'](_0x397e26)['then'](function(_0x3e51ac){_0x639681[_0xcfe9('0x1b')]=_0x3e51ac;if(_0x10c6cf[_0xcfe9('0x2c')]['includeAll']){_0x3fbc5f['include']=[{'all':!![]}];}return db[_0xcfe9('0x28')][_0xcfe9('0x39')](_0x3fbc5f);})[_0xcfe9('0x20')](function(_0x589f23){_0x639681[_0xcfe9('0x3a')]=_0x589f23;return _0x639681;})[_0xcfe9('0x20')](respondWithFilteredResult(_0x2bcb90,_0x3fbc5f))['catch'](handleError(_0x2bcb90,null));};exports[_0xcfe9('0x3b')]=function(_0x168024,_0x2612ea){var _0x40179d={'raw':!![],'where':{'id':_0x168024['params']['id']}},_0x2da942={};_0x2da942[_0xcfe9('0x2b')]=_[_0xcfe9('0x3c')](db[_0xcfe9('0x28')][_0xcfe9('0x29')]);_0x2da942[_0xcfe9('0x2c')]=_[_0xcfe9('0x3c')](_0x168024[_0xcfe9('0x2c')]);_0x2da942[_0xcfe9('0x33')]=_[_0xcfe9('0x2d')](_0x2da942[_0xcfe9('0x2b')],_0x2da942[_0xcfe9('0x2c')]);_0x40179d[_0xcfe9('0x3d')]=_[_0xcfe9('0x2d')](_0x2da942[_0xcfe9('0x2b')],qs[_0xcfe9('0x2e')](_0x168024[_0xcfe9('0x2c')][_0xcfe9('0x2e')]));_0x40179d[_0xcfe9('0x3d')]=_0x40179d[_0xcfe9('0x3d')][_0xcfe9('0x2f')]?_0x40179d[_0xcfe9('0x3d')]:_0x2da942[_0xcfe9('0x2b')];if(_0x168024[_0xcfe9('0x2c')][_0xcfe9('0x3e')]){_0x40179d['include']=[{'all':!![]}];}_0x40179d=_[_0xcfe9('0x36')]({},_0x40179d,_0x168024[_0xcfe9('0x38')]);return db[_0xcfe9('0x28')][_0xcfe9('0x3f')](_0x40179d)['then'](handleEntityNotFound(_0x2612ea,null))['then'](respondWithResult(_0x2612ea,null))['catch'](handleError(_0x2612ea,null));};exports[_0xcfe9('0x40')]=function(_0x18bdd0,_0x588a88){return db[_0xcfe9('0x28')][_0xcfe9('0x40')](_0x18bdd0[_0xcfe9('0x41')],{})[_0xcfe9('0x20')](respondWithResult(_0x588a88,0xc9))['catch'](handleError(_0x588a88,null));};exports[_0xcfe9('0x1f')]=function(_0x267708,_0x49464b){if(_0x267708[_0xcfe9('0x41')]['id']){delete _0x267708[_0xcfe9('0x41')]['id'];}return db['SquareDetailsReport'][_0xcfe9('0x3f')]({'where':{'id':_0x267708[_0xcfe9('0x42')]['id']}})[_0xcfe9('0x20')](handleEntityNotFound(_0x49464b,null))['then'](saveUpdates(_0x267708[_0xcfe9('0x41')],null))['then'](respondWithResult(_0x49464b,null))[_0xcfe9('0x43')](handleError(_0x49464b,null));};exports[_0xcfe9('0x21')]=function(_0x2860db,_0x328261){return db[_0xcfe9('0x28')]['find']({'where':{'id':_0x2860db[_0xcfe9('0x42')]['id']}})['then'](handleEntityNotFound(_0x328261,null))['then'](removeEntity(_0x328261,null))[_0xcfe9('0x43')](handleError(_0x328261,null));};exports[_0xcfe9('0x44')]=function(_0x325382,_0x367e32){return db[_0xcfe9('0x28')][_0xcfe9('0x44')]()[_0xcfe9('0x20')](respondWithResult(_0x367e32,null))[_0xcfe9('0x43')](handleError(_0x367e32,null));};
\ No newline at end of file
+var _0xcc24=['status','json','offset','undefined','limit','count','Content-Range','apply','save','then','destroy','end','stack','name','index','map','SquareDetailsReport','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','show','include','catch','create','update','body','find','params','describe','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus'];(function(_0xb305ce,_0x5d3cf2){var _0x550555=function(_0x5c90f4){while(--_0x5c90f4){_0xb305ce['push'](_0xb305ce['shift']());}};_0x550555(++_0x5d3cf2);}(_0xcc24,0x1d2));var _0x4cc2=function(_0x5203b7,_0x2a65b3){_0x5203b7=_0x5203b7-0x0;var _0x280dd1=_0xcc24[_0x5203b7];return _0x280dd1;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x4cc2('0x0'));var zipdir=require(_0x4cc2('0x1'));var jsonpatch=require(_0x4cc2('0x2'));var rp=require(_0x4cc2('0x3'));var moment=require(_0x4cc2('0x4'));var BPromise=require(_0x4cc2('0x5'));var Mustache=require(_0x4cc2('0x6'));var util=require(_0x4cc2('0x7'));var path=require(_0x4cc2('0x8'));var sox=require(_0x4cc2('0x9'));var csv=require(_0x4cc2('0xa'));var ejs=require(_0x4cc2('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x4cc2('0xc'));var squel=require(_0x4cc2('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x4cc2('0xe'));var Redis=require('ioredis');var authService=require(_0x4cc2('0xf'));var qs=require(_0x4cc2('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4cc2('0x11'));var logger=require(_0x4cc2('0x12'))(_0x4cc2('0x13'));var utils=require(_0x4cc2('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0x4cc2('0x15'));var db=require(_0x4cc2('0x16'))['db'];function respondWithStatusCode(_0x1d5e7f,_0x3e2a72){_0x3e2a72=_0x3e2a72||0xcc;return function(_0x35df54){if(_0x35df54){return _0x1d5e7f[_0x4cc2('0x17')](_0x3e2a72);}return _0x1d5e7f[_0x4cc2('0x18')](_0x3e2a72)['end']();};}function respondWithResult(_0x1c42e0,_0x49b85b){_0x49b85b=_0x49b85b||0xc8;return function(_0x178cbf){if(_0x178cbf){return _0x1c42e0[_0x4cc2('0x18')](_0x49b85b)[_0x4cc2('0x19')](_0x178cbf);}};}function respondWithFilteredResult(_0x1c3655,_0x2c50c7){return function(_0x16ea1a){if(_0x16ea1a){var _0x14f1ee=typeof _0x2c50c7[_0x4cc2('0x1a')]===_0x4cc2('0x1b')&&typeof _0x2c50c7[_0x4cc2('0x1c')]===_0x4cc2('0x1b');var _0x53628e=_0x16ea1a[_0x4cc2('0x1d')];var _0x5da9c9=_0x14f1ee?0x0:_0x2c50c7[_0x4cc2('0x1a')];var _0x20df80=_0x14f1ee?_0x16ea1a[_0x4cc2('0x1d')]:_0x2c50c7[_0x4cc2('0x1a')]+_0x2c50c7[_0x4cc2('0x1c')];var _0x1228de;if(_0x20df80>=_0x53628e){_0x20df80=_0x53628e;_0x1228de=0xc8;}else{_0x1228de=0xce;}_0x1c3655[_0x4cc2('0x18')](_0x1228de);return _0x1c3655['set'](_0x4cc2('0x1e'),_0x5da9c9+'-'+_0x20df80+'/'+_0x53628e)[_0x4cc2('0x19')](_0x16ea1a);}return null;};}function patchUpdates(_0x568dbd){return function(_0x1b62d9){try{jsonpatch[_0x4cc2('0x1f')](_0x1b62d9,_0x568dbd,!![]);}catch(_0x49ed5a){return BPromise['reject'](_0x49ed5a);}return _0x1b62d9[_0x4cc2('0x20')]();};}function saveUpdates(_0x5d6543,_0x52af9e){return function(_0x325fef){if(_0x325fef){return _0x325fef['update'](_0x5d6543)[_0x4cc2('0x21')](function(_0x3e65c0){return _0x3e65c0;});}return null;};}function removeEntity(_0x5d90fa,_0x5c228b){return function(_0x1b84dd){if(_0x1b84dd){return _0x1b84dd[_0x4cc2('0x22')]()[_0x4cc2('0x21')](function(){_0x5d90fa[_0x4cc2('0x18')](0xcc)[_0x4cc2('0x23')]();});}};}function handleEntityNotFound(_0xcd5ece,_0x4e21bf){return function(_0x442ec6){if(!_0x442ec6){_0xcd5ece[_0x4cc2('0x17')](0x194);}return _0x442ec6;};}function handleError(_0x4bc259,_0x152f8){_0x152f8=_0x152f8||0x1f4;return function(_0x39791d){logger['error'](_0x39791d[_0x4cc2('0x24')]);if(_0x39791d[_0x4cc2('0x25')]){delete _0x39791d[_0x4cc2('0x25')];}_0x4bc259[_0x4cc2('0x18')](_0x152f8)['send'](_0x39791d);};}exports[_0x4cc2('0x26')]=function(_0x4eeea5,_0x1f4bb2){var _0x58ed86={},_0x1bffa9={},_0x226108={'count':0x0,'rows':[]};var _0x3bf8bd=_[_0x4cc2('0x27')](db[_0x4cc2('0x28')]['rawAttributes'],function(_0x50ef7d){return{'name':_0x50ef7d[_0x4cc2('0x29')],'type':_0x50ef7d[_0x4cc2('0x2a')][_0x4cc2('0x2b')]};});_0x1bffa9[_0x4cc2('0x2c')]=_[_0x4cc2('0x27')](_0x3bf8bd,_0x4cc2('0x25'));_0x1bffa9[_0x4cc2('0x2d')]=_[_0x4cc2('0x2e')](_0x4eeea5['query']);_0x1bffa9[_0x4cc2('0x2f')]=_[_0x4cc2('0x30')](_0x1bffa9['model'],_0x1bffa9[_0x4cc2('0x2d')]);_0x58ed86[_0x4cc2('0x31')]=_[_0x4cc2('0x30')](_0x1bffa9[_0x4cc2('0x2c')],qs[_0x4cc2('0x32')](_0x4eeea5[_0x4cc2('0x2d')]['fields']));_0x58ed86[_0x4cc2('0x31')]=_0x58ed86[_0x4cc2('0x31')]['length']?_0x58ed86[_0x4cc2('0x31')]:_0x1bffa9[_0x4cc2('0x2c')];if(!_0x4eeea5[_0x4cc2('0x2d')][_0x4cc2('0x33')]('nolimit')){_0x58ed86['limit']=qs[_0x4cc2('0x1c')](_0x4eeea5[_0x4cc2('0x2d')][_0x4cc2('0x1c')]);_0x58ed86[_0x4cc2('0x1a')]=qs['offset'](_0x4eeea5[_0x4cc2('0x2d')]['offset']);}_0x58ed86['order']=qs[_0x4cc2('0x34')](_0x4eeea5[_0x4cc2('0x2d')][_0x4cc2('0x34')]);_0x58ed86[_0x4cc2('0x35')]=qs[_0x4cc2('0x2f')](_[_0x4cc2('0x36')](_0x4eeea5['query'],_0x1bffa9[_0x4cc2('0x2f')]),_0x3bf8bd);if(_0x4eeea5[_0x4cc2('0x2d')][_0x4cc2('0x37')]){_0x58ed86[_0x4cc2('0x35')]=_[_0x4cc2('0x38')](_0x58ed86[_0x4cc2('0x35')],{'$or':_[_0x4cc2('0x27')](_0x3bf8bd,function(_0x1d3446){if(_0x1d3446[_0x4cc2('0x2a')]!==_0x4cc2('0x39')){var _0x178e4a={};_0x178e4a[_0x1d3446[_0x4cc2('0x25')]]={'$like':'%'+_0x4eeea5[_0x4cc2('0x2d')][_0x4cc2('0x37')]+'%'};return _0x178e4a;}})});}_0x58ed86=_[_0x4cc2('0x38')]({},_0x58ed86,_0x4eeea5[_0x4cc2('0x3a')]);var _0xa0bbc3={'where':_0x58ed86[_0x4cc2('0x35')]};return db['SquareDetailsReport'][_0x4cc2('0x1d')](_0xa0bbc3)[_0x4cc2('0x21')](function(_0x4e38a7){_0x226108['count']=_0x4e38a7;if(_0x4eeea5[_0x4cc2('0x2d')][_0x4cc2('0x3b')]){_0x58ed86['include']=[{'all':!![]}];}return db[_0x4cc2('0x28')][_0x4cc2('0x3c')](_0x58ed86);})['then'](function(_0x65ae5c){_0x226108['rows']=_0x65ae5c;return _0x226108;})[_0x4cc2('0x21')](respondWithFilteredResult(_0x1f4bb2,_0x58ed86))['catch'](handleError(_0x1f4bb2,null));};exports[_0x4cc2('0x3d')]=function(_0x480ea0,_0x30013a){var _0x108777={'raw':!![],'where':{'id':_0x480ea0['params']['id']}},_0x5654c1={};_0x5654c1[_0x4cc2('0x2c')]=_[_0x4cc2('0x2e')](db[_0x4cc2('0x28')]['rawAttributes']);_0x5654c1['query']=_[_0x4cc2('0x2e')](_0x480ea0['query']);_0x5654c1[_0x4cc2('0x2f')]=_[_0x4cc2('0x30')](_0x5654c1['model'],_0x5654c1['query']);_0x108777[_0x4cc2('0x31')]=_[_0x4cc2('0x30')](_0x5654c1[_0x4cc2('0x2c')],qs[_0x4cc2('0x32')](_0x480ea0[_0x4cc2('0x2d')][_0x4cc2('0x32')]));_0x108777[_0x4cc2('0x31')]=_0x108777['attributes']['length']?_0x108777[_0x4cc2('0x31')]:_0x5654c1[_0x4cc2('0x2c')];if(_0x480ea0[_0x4cc2('0x2d')][_0x4cc2('0x3b')]){_0x108777[_0x4cc2('0x3e')]=[{'all':!![]}];}_0x108777=_[_0x4cc2('0x38')]({},_0x108777,_0x480ea0[_0x4cc2('0x3a')]);return db['SquareDetailsReport']['find'](_0x108777)[_0x4cc2('0x21')](handleEntityNotFound(_0x30013a,null))[_0x4cc2('0x21')](respondWithResult(_0x30013a,null))[_0x4cc2('0x3f')](handleError(_0x30013a,null));};exports[_0x4cc2('0x40')]=function(_0x142b7c,_0x1b3115){return db[_0x4cc2('0x28')][_0x4cc2('0x40')](_0x142b7c['body'],{})[_0x4cc2('0x21')](respondWithResult(_0x1b3115,0xc9))[_0x4cc2('0x3f')](handleError(_0x1b3115,null));};exports[_0x4cc2('0x41')]=function(_0x292636,_0x5e030d){if(_0x292636[_0x4cc2('0x42')]['id']){delete _0x292636[_0x4cc2('0x42')]['id'];}return db[_0x4cc2('0x28')][_0x4cc2('0x43')]({'where':{'id':_0x292636[_0x4cc2('0x44')]['id']}})[_0x4cc2('0x21')](handleEntityNotFound(_0x5e030d,null))['then'](saveUpdates(_0x292636[_0x4cc2('0x42')],null))[_0x4cc2('0x21')](respondWithResult(_0x5e030d,null))[_0x4cc2('0x3f')](handleError(_0x5e030d,null));};exports['destroy']=function(_0x5dc56a,_0x7bb5c5){return db[_0x4cc2('0x28')][_0x4cc2('0x43')]({'where':{'id':_0x5dc56a[_0x4cc2('0x44')]['id']}})[_0x4cc2('0x21')](handleEntityNotFound(_0x7bb5c5,null))[_0x4cc2('0x21')](removeEntity(_0x7bb5c5,null))[_0x4cc2('0x3f')](handleError(_0x7bb5c5,null));};exports[_0x4cc2('0x45')]=function(_0x55c9c8,_0x1e50fc){return db[_0x4cc2('0x28')][_0x4cc2('0x45')]()[_0x4cc2('0x21')](respondWithResult(_0x1e50fc,null))[_0x4cc2('0x3f')](handleError(_0x1e50fc,null));};
\ No newline at end of file