Built motion from commit 0900f080.|2.5.45
[motion2.git] / server / api / voiceTransferReport / voiceTransferReport.controller.js
index 54a014a..f4521e2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcb91=['to-csv','fs-extra','lodash','crypto','jsforce','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','update','then','destroy','error','stack','name','send','index','map','rawAttributes','fieldName','type','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','VIRTUAL','filter','VoiceTransferReport','includeAll','rows','catch','params','include','merge','options','create','body','find','describe','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox'];(function(_0x26e5f3,_0x35d97d){var _0x14bf06=function(_0x4521c0){while(--_0x4521c0){_0x26e5f3['push'](_0x26e5f3['shift']());}};_0x14bf06(++_0x35d97d);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x325501,_0x5242f6){_0x325501=_0x325501-0x0;var _0x2c1626=_0xcb91[_0x325501];return _0x2c1626;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x1cb9('0x0'));var jsonpatch=require(_0x1cb9('0x1'));var rp=require(_0x1cb9('0x2'));var moment=require(_0x1cb9('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x1cb9('0x4'));var util=require(_0x1cb9('0x5'));var path=require('path');var sox=require(_0x1cb9('0x6'));var csv=require(_0x1cb9('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x1cb9('0x8'));var _=require(_0x1cb9('0x9'));var squel=require('squel');var crypto=require(_0x1cb9('0xa'));var jsforce=require(_0x1cb9('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x1cb9('0x7'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x1cb9('0xc'));var authService=require(_0x1cb9('0xd'));var qs=require(_0x1cb9('0xe'));var as=require(_0x1cb9('0xf'));var hardwareService=require(_0x1cb9('0x10'));var logger=require('../../config/logger')(_0x1cb9('0x11'));var utils=require(_0x1cb9('0x12'));var config=require(_0x1cb9('0x13'));var licenseUtil=require(_0x1cb9('0x14'));var db=require(_0x1cb9('0x15'))['db'];function respondWithStatusCode(_0x5445e1,_0x5e3c19){_0x5e3c19=_0x5e3c19||0xcc;return function(_0x59dec3){if(_0x59dec3){return _0x5445e1[_0x1cb9('0x16')](_0x5e3c19);}return _0x5445e1[_0x1cb9('0x17')](_0x5e3c19)[_0x1cb9('0x18')]();};}function respondWithResult(_0x1c714f,_0x56884d){_0x56884d=_0x56884d||0xc8;return function(_0x397727){if(_0x397727){return _0x1c714f[_0x1cb9('0x17')](_0x56884d)[_0x1cb9('0x19')](_0x397727);}};}function respondWithFilteredResult(_0x8dfa55,_0x3e2d11){return function(_0x5806d8){if(_0x5806d8){var _0x5572cb=typeof _0x3e2d11[_0x1cb9('0x1a')]===_0x1cb9('0x1b')&&typeof _0x3e2d11[_0x1cb9('0x1c')]===_0x1cb9('0x1b');var _0x3e21e0=_0x5806d8[_0x1cb9('0x1d')];var _0x23d3a9=_0x5572cb?0x0:_0x3e2d11['offset'];var _0x479d43=_0x5572cb?_0x5806d8[_0x1cb9('0x1d')]:_0x3e2d11[_0x1cb9('0x1a')]+_0x3e2d11[_0x1cb9('0x1c')];var _0x31481a;if(_0x479d43>=_0x3e21e0){_0x479d43=_0x3e21e0;_0x31481a=0xc8;}else{_0x31481a=0xce;}_0x8dfa55[_0x1cb9('0x17')](_0x31481a);return _0x8dfa55[_0x1cb9('0x1e')](_0x1cb9('0x1f'),_0x23d3a9+'-'+_0x479d43+'/'+_0x3e21e0)['json'](_0x5806d8);}return null;};}function patchUpdates(_0x559bcc){return function(_0x1a5a72){try{jsonpatch['apply'](_0x1a5a72,_0x559bcc,!![]);}catch(_0x4750b1){return BPromise[_0x1cb9('0x20')](_0x4750b1);}return _0x1a5a72['save']();};}function saveUpdates(_0x599275,_0x2e3854){return function(_0x325637){if(_0x325637){return _0x325637[_0x1cb9('0x21')](_0x599275)[_0x1cb9('0x22')](function(_0x45b8d3){return _0x45b8d3;});}return null;};}function removeEntity(_0x27db16,_0x59ebea){return function(_0x55b232){if(_0x55b232){return _0x55b232[_0x1cb9('0x23')]()['then'](function(){_0x27db16[_0x1cb9('0x17')](0xcc)[_0x1cb9('0x18')]();});}};}function handleEntityNotFound(_0x69b4c8,_0x44d3c4){return function(_0x43a100){if(!_0x43a100){_0x69b4c8['sendStatus'](0x194);}return _0x43a100;};}function handleError(_0x195f16,_0x9df250){_0x9df250=_0x9df250||0x1f4;return function(_0x4c8d76){logger[_0x1cb9('0x24')](_0x4c8d76[_0x1cb9('0x25')]);if(_0x4c8d76[_0x1cb9('0x26')]){delete _0x4c8d76[_0x1cb9('0x26')];}_0x195f16[_0x1cb9('0x17')](_0x9df250)[_0x1cb9('0x27')](_0x4c8d76);};}exports[_0x1cb9('0x28')]=function(_0xb644b3,_0x41e5c2){var _0x9de64b={},_0x48888d={},_0x405a2f={'count':0x0,'rows':[]};var _0x536635=_[_0x1cb9('0x29')](db['VoiceTransferReport'][_0x1cb9('0x2a')],function(_0x41011c){return{'name':_0x41011c[_0x1cb9('0x2b')],'type':_0x41011c[_0x1cb9('0x2c')]['key']};});_0x48888d[_0x1cb9('0x2d')]=_['map'](_0x536635,_0x1cb9('0x26'));_0x48888d[_0x1cb9('0x2e')]=_[_0x1cb9('0x2f')](_0xb644b3['query']);_0x48888d[_0x1cb9('0x30')]=_['intersection'](_0x48888d[_0x1cb9('0x2d')],_0x48888d['query']);_0x9de64b[_0x1cb9('0x31')]=_[_0x1cb9('0x32')](_0x48888d[_0x1cb9('0x2d')],qs[_0x1cb9('0x33')](_0xb644b3['query'][_0x1cb9('0x33')]));_0x9de64b[_0x1cb9('0x31')]=_0x9de64b[_0x1cb9('0x31')][_0x1cb9('0x34')]?_0x9de64b[_0x1cb9('0x31')]:_0x48888d[_0x1cb9('0x2d')];if(!_0xb644b3[_0x1cb9('0x2e')][_0x1cb9('0x35')](_0x1cb9('0x36'))){_0x9de64b[_0x1cb9('0x1c')]=qs[_0x1cb9('0x1c')](_0xb644b3[_0x1cb9('0x2e')][_0x1cb9('0x1c')]);_0x9de64b['offset']=qs['offset'](_0xb644b3[_0x1cb9('0x2e')][_0x1cb9('0x1a')]);}_0x9de64b[_0x1cb9('0x37')]=qs[_0x1cb9('0x38')](_0xb644b3[_0x1cb9('0x2e')][_0x1cb9('0x38')]);_0x9de64b[_0x1cb9('0x39')]=qs[_0x1cb9('0x30')](_['pick'](_0xb644b3[_0x1cb9('0x2e')],_0x48888d[_0x1cb9('0x30')]),_0x536635);if(_0xb644b3[_0x1cb9('0x2e')]['filter']){_0x9de64b[_0x1cb9('0x39')]=_['merge'](_0x9de64b[_0x1cb9('0x39')],{'$or':_['map'](_0x536635,function(_0x2a73f2){if(_0x2a73f2[_0x1cb9('0x2c')]!==_0x1cb9('0x3a')){var _0x2bcacd={};_0x2bcacd[_0x2a73f2[_0x1cb9('0x26')]]={'$like':'%'+_0xb644b3[_0x1cb9('0x2e')][_0x1cb9('0x3b')]+'%'};return _0x2bcacd;}})});}_0x9de64b=_['merge']({},_0x9de64b,_0xb644b3['options']);var _0x4111b8={'where':_0x9de64b[_0x1cb9('0x39')]};return db[_0x1cb9('0x3c')][_0x1cb9('0x1d')](_0x4111b8)[_0x1cb9('0x22')](function(_0x1d7304){_0x405a2f[_0x1cb9('0x1d')]=_0x1d7304;if(_0xb644b3['query'][_0x1cb9('0x3d')]){_0x9de64b['include']=[{'all':!![]}];}return db['VoiceTransferReport']['findAll'](_0x9de64b);})[_0x1cb9('0x22')](function(_0x397ff9){_0x405a2f[_0x1cb9('0x3e')]=_0x397ff9;return _0x405a2f;})[_0x1cb9('0x22')](respondWithFilteredResult(_0x41e5c2,_0x9de64b))[_0x1cb9('0x3f')](handleError(_0x41e5c2,null));};exports['show']=function(_0x2a624f,_0x523866){var _0x91121={'raw':!![],'where':{'id':_0x2a624f[_0x1cb9('0x40')]['id']}},_0x71db9d={};_0x71db9d['model']=_[_0x1cb9('0x2f')](db['VoiceTransferReport'][_0x1cb9('0x2a')]);_0x71db9d[_0x1cb9('0x2e')]=_['keys'](_0x2a624f['query']);_0x71db9d[_0x1cb9('0x30')]=_[_0x1cb9('0x32')](_0x71db9d[_0x1cb9('0x2d')],_0x71db9d[_0x1cb9('0x2e')]);_0x91121[_0x1cb9('0x31')]=_['intersection'](_0x71db9d[_0x1cb9('0x2d')],qs['fields'](_0x2a624f['query']['fields']));_0x91121[_0x1cb9('0x31')]=_0x91121[_0x1cb9('0x31')][_0x1cb9('0x34')]?_0x91121[_0x1cb9('0x31')]:_0x71db9d[_0x1cb9('0x2d')];if(_0x2a624f[_0x1cb9('0x2e')][_0x1cb9('0x3d')]){_0x91121[_0x1cb9('0x41')]=[{'all':!![]}];}_0x91121=_[_0x1cb9('0x42')]({},_0x91121,_0x2a624f[_0x1cb9('0x43')]);return db[_0x1cb9('0x3c')]['find'](_0x91121)[_0x1cb9('0x22')](handleEntityNotFound(_0x523866,null))[_0x1cb9('0x22')](respondWithResult(_0x523866,null))[_0x1cb9('0x3f')](handleError(_0x523866,null));};exports['create']=function(_0x179e81,_0x57251){return db[_0x1cb9('0x3c')][_0x1cb9('0x44')](_0x179e81[_0x1cb9('0x45')],{})['then'](respondWithResult(_0x57251,0xc9))[_0x1cb9('0x3f')](handleError(_0x57251,null));};exports['update']=function(_0x2eaa11,_0x4ac483){if(_0x2eaa11[_0x1cb9('0x45')]['id']){delete _0x2eaa11[_0x1cb9('0x45')]['id'];}return db[_0x1cb9('0x3c')][_0x1cb9('0x46')]({'where':{'id':_0x2eaa11['params']['id']}})[_0x1cb9('0x22')](handleEntityNotFound(_0x4ac483,null))[_0x1cb9('0x22')](saveUpdates(_0x2eaa11[_0x1cb9('0x45')],null))[_0x1cb9('0x22')](respondWithResult(_0x4ac483,null))[_0x1cb9('0x3f')](handleError(_0x4ac483,null));};exports[_0x1cb9('0x23')]=function(_0x17b92a,_0x3b6a92){return db[_0x1cb9('0x3c')][_0x1cb9('0x46')]({'where':{'id':_0x17b92a['params']['id']}})['then'](handleEntityNotFound(_0x3b6a92,null))[_0x1cb9('0x22')](removeEntity(_0x3b6a92,null))[_0x1cb9('0x3f')](handleError(_0x3b6a92,null));};exports[_0x1cb9('0x47')]=function(_0x1e073d,_0x20b253){return db[_0x1cb9('0x3c')][_0x1cb9('0x47')]()[_0x1cb9('0x22')](respondWithResult(_0x20b253,null))[_0x1cb9('0x3f')](handleError(_0x20b253,null));};
\ No newline at end of file
+var _0xa20a=['rows','catch','show','params','include','create','body','find','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','desk.js','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','sendStatus','status','end','json','offset','undefined','count','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','map','VoiceTransferReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','limit','order','sort','where','pick','merge','filter','options','includeAll'];(function(_0x3861f9,_0x483566){var _0x39d3d8=function(_0x5daf08){while(--_0x5daf08){_0x3861f9['push'](_0x3861f9['shift']());}};_0x39d3d8(++_0x483566);}(_0xa20a,0x14d));var _0xaa20=function(_0x5a3cf0,_0x160a68){_0x5a3cf0=_0x5a3cf0-0x0;var _0x5a64ee=_0xa20a[_0x5a3cf0];return _0x5a64ee;};'use strict';var emlformat=require(_0xaa20('0x0'));var rimraf=require(_0xaa20('0x1'));var zipdir=require(_0xaa20('0x2'));var jsonpatch=require(_0xaa20('0x3'));var rp=require('request-promise');var moment=require(_0xaa20('0x4'));var BPromise=require(_0xaa20('0x5'));var Mustache=require(_0xaa20('0x6'));var util=require(_0xaa20('0x7'));var path=require(_0xaa20('0x8'));var sox=require(_0xaa20('0x9'));var csv=require(_0xaa20('0xa'));var ejs=require(_0xaa20('0xb'));var fs=require('fs');var fs_extra=require(_0xaa20('0xc'));var _=require(_0xaa20('0xd'));var squel=require('squel');var crypto=require(_0xaa20('0xe'));var jsforce=require('jsforce');var deskjs=require(_0xaa20('0xf'));var toCsv=require(_0xaa20('0xa'));var querystring=require(_0xaa20('0x10'));var Papa=require(_0xaa20('0x11'));var Redis=require(_0xaa20('0x12'));var authService=require(_0xaa20('0x13'));var qs=require(_0xaa20('0x14'));var as=require(_0xaa20('0x15'));var hardwareService=require(_0xaa20('0x16'));var logger=require(_0xaa20('0x17'))(_0xaa20('0x18'));var utils=require(_0xaa20('0x19'));var config=require(_0xaa20('0x1a'));var licenseUtil=require(_0xaa20('0x1b'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4ae093,_0x17a729){_0x17a729=_0x17a729||0xcc;return function(_0x226d2d){if(_0x226d2d){return _0x4ae093[_0xaa20('0x1c')](_0x17a729);}return _0x4ae093[_0xaa20('0x1d')](_0x17a729)[_0xaa20('0x1e')]();};}function respondWithResult(_0x480fa4,_0x5db849){_0x5db849=_0x5db849||0xc8;return function(_0x3a6b5d){if(_0x3a6b5d){return _0x480fa4[_0xaa20('0x1d')](_0x5db849)[_0xaa20('0x1f')](_0x3a6b5d);}};}function respondWithFilteredResult(_0x42b666,_0x35ca36){return function(_0x3dea48){if(_0x3dea48){var _0x231da0=typeof _0x35ca36[_0xaa20('0x20')]===_0xaa20('0x21')&&typeof _0x35ca36['limit']===_0xaa20('0x21');var _0x51f002=_0x3dea48[_0xaa20('0x22')];var _0x846fbe=_0x231da0?0x0:_0x35ca36[_0xaa20('0x20')];var _0x5ac1d6=_0x231da0?_0x3dea48[_0xaa20('0x22')]:_0x35ca36[_0xaa20('0x20')]+_0x35ca36['limit'];var _0x1dd643;if(_0x5ac1d6>=_0x51f002){_0x5ac1d6=_0x51f002;_0x1dd643=0xc8;}else{_0x1dd643=0xce;}_0x42b666[_0xaa20('0x1d')](_0x1dd643);return _0x42b666[_0xaa20('0x23')](_0xaa20('0x24'),_0x846fbe+'-'+_0x5ac1d6+'/'+_0x51f002)[_0xaa20('0x1f')](_0x3dea48);}return null;};}function patchUpdates(_0x296f70){return function(_0x368383){try{jsonpatch[_0xaa20('0x25')](_0x368383,_0x296f70,!![]);}catch(_0x3389fa){return BPromise[_0xaa20('0x26')](_0x3389fa);}return _0x368383[_0xaa20('0x27')]();};}function saveUpdates(_0x312f73,_0x3f803d){return function(_0x8d0067){if(_0x8d0067){return _0x8d0067[_0xaa20('0x28')](_0x312f73)[_0xaa20('0x29')](function(_0x36481c){return _0x36481c;});}return null;};}function removeEntity(_0x5b6918,_0x336df6){return function(_0x4308e6){if(_0x4308e6){return _0x4308e6[_0xaa20('0x2a')]()[_0xaa20('0x29')](function(){_0x5b6918['status'](0xcc)[_0xaa20('0x1e')]();});}};}function handleEntityNotFound(_0x403168,_0x467438){return function(_0x21a71c){if(!_0x21a71c){_0x403168['sendStatus'](0x194);}return _0x21a71c;};}function handleError(_0xf117e6,_0x858f1a){_0x858f1a=_0x858f1a||0x1f4;return function(_0x1b16ca){logger[_0xaa20('0x2b')](_0x1b16ca[_0xaa20('0x2c')]);if(_0x1b16ca[_0xaa20('0x2d')]){delete _0x1b16ca[_0xaa20('0x2d')];}_0xf117e6[_0xaa20('0x1d')](_0x858f1a)[_0xaa20('0x2e')](_0x1b16ca);};}exports[_0xaa20('0x2f')]=function(_0x58bfff,_0xa6463b){var _0x3c48c6={},_0x5316ce={},_0x112fa4={'count':0x0,'rows':[]};var _0x536158=_[_0xaa20('0x30')](db[_0xaa20('0x31')][_0xaa20('0x32')],function(_0x3580ea){return{'name':_0x3580ea[_0xaa20('0x33')],'type':_0x3580ea[_0xaa20('0x34')][_0xaa20('0x35')]};});_0x5316ce[_0xaa20('0x36')]=_[_0xaa20('0x30')](_0x536158,'name');_0x5316ce[_0xaa20('0x37')]=_[_0xaa20('0x38')](_0x58bfff[_0xaa20('0x37')]);_0x5316ce[_0xaa20('0x39')]=_[_0xaa20('0x3a')](_0x5316ce[_0xaa20('0x36')],_0x5316ce[_0xaa20('0x37')]);_0x3c48c6[_0xaa20('0x3b')]=_['intersection'](_0x5316ce[_0xaa20('0x36')],qs['fields'](_0x58bfff['query'][_0xaa20('0x3c')]));_0x3c48c6['attributes']=_0x3c48c6[_0xaa20('0x3b')]['length']?_0x3c48c6[_0xaa20('0x3b')]:_0x5316ce[_0xaa20('0x36')];if(!_0x58bfff[_0xaa20('0x37')][_0xaa20('0x3d')](_0xaa20('0x3e'))){_0x3c48c6['limit']=qs[_0xaa20('0x3f')](_0x58bfff['query'][_0xaa20('0x3f')]);_0x3c48c6[_0xaa20('0x20')]=qs[_0xaa20('0x20')](_0x58bfff[_0xaa20('0x37')][_0xaa20('0x20')]);}_0x3c48c6[_0xaa20('0x40')]=qs[_0xaa20('0x41')](_0x58bfff['query'][_0xaa20('0x41')]);_0x3c48c6[_0xaa20('0x42')]=qs[_0xaa20('0x39')](_[_0xaa20('0x43')](_0x58bfff[_0xaa20('0x37')],_0x5316ce[_0xaa20('0x39')]),_0x536158);if(_0x58bfff[_0xaa20('0x37')]['filter']){_0x3c48c6[_0xaa20('0x42')]=_[_0xaa20('0x44')](_0x3c48c6[_0xaa20('0x42')],{'$or':_['map'](_0x536158,function(_0x3f9d6e){if(_0x3f9d6e[_0xaa20('0x34')]!=='VIRTUAL'){var _0x87eae0={};_0x87eae0[_0x3f9d6e[_0xaa20('0x2d')]]={'$like':'%'+_0x58bfff[_0xaa20('0x37')][_0xaa20('0x45')]+'%'};return _0x87eae0;}})});}_0x3c48c6=_[_0xaa20('0x44')]({},_0x3c48c6,_0x58bfff[_0xaa20('0x46')]);var _0xd9da54={'where':_0x3c48c6[_0xaa20('0x42')]};return db[_0xaa20('0x31')][_0xaa20('0x22')](_0xd9da54)[_0xaa20('0x29')](function(_0x40a3cd){_0x112fa4[_0xaa20('0x22')]=_0x40a3cd;if(_0x58bfff[_0xaa20('0x37')][_0xaa20('0x47')]){_0x3c48c6['include']=[{'all':!![]}];}return db[_0xaa20('0x31')]['findAll'](_0x3c48c6);})[_0xaa20('0x29')](function(_0x2e8cc5){_0x112fa4[_0xaa20('0x48')]=_0x2e8cc5;return _0x112fa4;})[_0xaa20('0x29')](respondWithFilteredResult(_0xa6463b,_0x3c48c6))[_0xaa20('0x49')](handleError(_0xa6463b,null));};exports[_0xaa20('0x4a')]=function(_0x27c570,_0x20e518){var _0x1c69fa={'raw':!![],'where':{'id':_0x27c570[_0xaa20('0x4b')]['id']}},_0x12c8c8={};_0x12c8c8['model']=_[_0xaa20('0x38')](db[_0xaa20('0x31')]['rawAttributes']);_0x12c8c8['query']=_[_0xaa20('0x38')](_0x27c570[_0xaa20('0x37')]);_0x12c8c8[_0xaa20('0x39')]=_[_0xaa20('0x3a')](_0x12c8c8[_0xaa20('0x36')],_0x12c8c8[_0xaa20('0x37')]);_0x1c69fa[_0xaa20('0x3b')]=_['intersection'](_0x12c8c8[_0xaa20('0x36')],qs[_0xaa20('0x3c')](_0x27c570[_0xaa20('0x37')][_0xaa20('0x3c')]));_0x1c69fa[_0xaa20('0x3b')]=_0x1c69fa[_0xaa20('0x3b')]['length']?_0x1c69fa[_0xaa20('0x3b')]:_0x12c8c8[_0xaa20('0x36')];if(_0x27c570[_0xaa20('0x37')][_0xaa20('0x47')]){_0x1c69fa[_0xaa20('0x4c')]=[{'all':!![]}];}_0x1c69fa=_[_0xaa20('0x44')]({},_0x1c69fa,_0x27c570['options']);return db[_0xaa20('0x31')]['find'](_0x1c69fa)[_0xaa20('0x29')](handleEntityNotFound(_0x20e518,null))[_0xaa20('0x29')](respondWithResult(_0x20e518,null))['catch'](handleError(_0x20e518,null));};exports['create']=function(_0xe4861c,_0x46c71e){return db[_0xaa20('0x31')][_0xaa20('0x4d')](_0xe4861c[_0xaa20('0x4e')],{})[_0xaa20('0x29')](respondWithResult(_0x46c71e,0xc9))[_0xaa20('0x49')](handleError(_0x46c71e,null));};exports[_0xaa20('0x28')]=function(_0x148adc,_0x2bb76f){if(_0x148adc['body']['id']){delete _0x148adc[_0xaa20('0x4e')]['id'];}return db[_0xaa20('0x31')][_0xaa20('0x4f')]({'where':{'id':_0x148adc[_0xaa20('0x4b')]['id']}})[_0xaa20('0x29')](handleEntityNotFound(_0x2bb76f,null))['then'](saveUpdates(_0x148adc[_0xaa20('0x4e')],null))[_0xaa20('0x29')](respondWithResult(_0x2bb76f,null))['catch'](handleError(_0x2bb76f,null));};exports[_0xaa20('0x2a')]=function(_0x6dba2e,_0x296980){return db[_0xaa20('0x31')][_0xaa20('0x4f')]({'where':{'id':_0x6dba2e[_0xaa20('0x4b')]['id']}})[_0xaa20('0x29')](handleEntityNotFound(_0x296980,null))[_0xaa20('0x29')](removeEntity(_0x296980,null))[_0xaa20('0x49')](handleError(_0x296980,null));};exports[_0xaa20('0x50')]=function(_0x1a553b,_0x1f853c){return db[_0xaa20('0x31')][_0xaa20('0x50')]()['then'](respondWithResult(_0x1f853c,null))['catch'](handleError(_0x1f853c,null));};
\ No newline at end of file