Built motion from commit 3a7e82ea.|2.6.29
[motion2.git] / server / api / squareReport / squareReport.controller.js
index 7dafff2..8e435c0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7ebe=['body','describe','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','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','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','Content-Range','apply','reject','save','destroy','then','error','stack','name','send','map','rawAttributes','fieldName','type','key','model','query','intersection','attributes','fields','length','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','SquareReport','findAll','rows','catch','show','params','find','create','update'];(function(_0x2eae90,_0x3b09f2){var _0x27fce6=function(_0x30c5c7){while(--_0x30c5c7){_0x2eae90['push'](_0x2eae90['shift']());}};_0x27fce6(++_0x3b09f2);}(_0x7ebe,0xf8));var _0xe7eb=function(_0x3e660e,_0x443de6){_0x3e660e=_0x3e660e-0x0;var _0x113b80=_0x7ebe[_0x3e660e];return _0x113b80;};'use strict';var emlformat=require(_0xe7eb('0x0'));var rimraf=require(_0xe7eb('0x1'));var zipdir=require(_0xe7eb('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe7eb('0x3'));var moment=require('moment');var BPromise=require(_0xe7eb('0x4'));var Mustache=require(_0xe7eb('0x5'));var util=require(_0xe7eb('0x6'));var path=require(_0xe7eb('0x7'));var sox=require(_0xe7eb('0x8'));var csv=require(_0xe7eb('0x9'));var ejs=require(_0xe7eb('0xa'));var fs=require('fs');var fs_extra=require(_0xe7eb('0xb'));var _=require(_0xe7eb('0xc'));var squel=require(_0xe7eb('0xd'));var crypto=require(_0xe7eb('0xe'));var jsforce=require(_0xe7eb('0xf'));var deskjs=require(_0xe7eb('0x10'));var toCsv=require('to-csv');var querystring=require(_0xe7eb('0x11'));var Papa=require(_0xe7eb('0x12'));var Redis=require(_0xe7eb('0x13'));var authService=require(_0xe7eb('0x14'));var qs=require(_0xe7eb('0x15'));var as=require(_0xe7eb('0x16'));var hardwareService=require(_0xe7eb('0x17'));var logger=require(_0xe7eb('0x18'))(_0xe7eb('0x19'));var utils=require(_0xe7eb('0x1a'));var config=require(_0xe7eb('0x1b'));var licenseUtil=require(_0xe7eb('0x1c'));var db=require(_0xe7eb('0x1d'))['db'];function respondWithStatusCode(_0x34c6d8,_0x226f73){_0x226f73=_0x226f73||0xcc;return function(_0x500e45){if(_0x500e45){return _0x34c6d8[_0xe7eb('0x1e')](_0x226f73);}return _0x34c6d8[_0xe7eb('0x1f')](_0x226f73)[_0xe7eb('0x20')]();};}function respondWithResult(_0x8b26c6,_0x36fa50){_0x36fa50=_0x36fa50||0xc8;return function(_0x20ce7b){if(_0x20ce7b){return _0x8b26c6[_0xe7eb('0x1f')](_0x36fa50)[_0xe7eb('0x21')](_0x20ce7b);}};}function respondWithFilteredResult(_0x1e0b69,_0x9d9670){return function(_0x3396ff){if(_0x3396ff){var _0x20bc30=typeof _0x9d9670[_0xe7eb('0x22')]===_0xe7eb('0x23')&&typeof _0x9d9670['limit']===_0xe7eb('0x23');var _0x4e90b5=_0x3396ff[_0xe7eb('0x24')];var _0x5f0c39=_0x20bc30?0x0:_0x9d9670['offset'];var _0x4e626c=_0x20bc30?_0x3396ff[_0xe7eb('0x24')]:_0x9d9670[_0xe7eb('0x22')]+_0x9d9670[_0xe7eb('0x25')];var _0x54f135;if(_0x4e626c>=_0x4e90b5){_0x4e626c=_0x4e90b5;_0x54f135=0xc8;}else{_0x54f135=0xce;}_0x1e0b69[_0xe7eb('0x1f')](_0x54f135);return _0x1e0b69['set'](_0xe7eb('0x26'),_0x5f0c39+'-'+_0x4e626c+'/'+_0x4e90b5)['json'](_0x3396ff);}return null;};}function patchUpdates(_0x18a540){return function(_0x37db86){try{jsonpatch[_0xe7eb('0x27')](_0x37db86,_0x18a540,!![]);}catch(_0x1f4b34){return BPromise[_0xe7eb('0x28')](_0x1f4b34);}return _0x37db86[_0xe7eb('0x29')]();};}function saveUpdates(_0xe27c3,_0x5efc8b){return function(_0xfd2357){if(_0xfd2357){return _0xfd2357['update'](_0xe27c3)['then'](function(_0xd4b6f9){return _0xd4b6f9;});}return null;};}function removeEntity(_0x1d7516,_0x40dc38){return function(_0x46f9cf){if(_0x46f9cf){return _0x46f9cf[_0xe7eb('0x2a')]()[_0xe7eb('0x2b')](function(){_0x1d7516[_0xe7eb('0x1f')](0xcc)[_0xe7eb('0x20')]();});}};}function handleEntityNotFound(_0x287f0e,_0x3a4a80){return function(_0x4dad21){if(!_0x4dad21){_0x287f0e[_0xe7eb('0x1e')](0x194);}return _0x4dad21;};}function handleError(_0x2d6545,_0x4c7922){_0x4c7922=_0x4c7922||0x1f4;return function(_0x4cbe85){logger[_0xe7eb('0x2c')](_0x4cbe85[_0xe7eb('0x2d')]);if(_0x4cbe85[_0xe7eb('0x2e')]){delete _0x4cbe85['name'];}_0x2d6545[_0xe7eb('0x1f')](_0x4c7922)[_0xe7eb('0x2f')](_0x4cbe85);};}exports['index']=function(_0x1bad98,_0x594e8b){var _0x3441bc={},_0x54e443={},_0x224d9e={'count':0x0,'rows':[]};var _0x285446=_[_0xe7eb('0x30')](db['SquareReport'][_0xe7eb('0x31')],function(_0x321dca){return{'name':_0x321dca[_0xe7eb('0x32')],'type':_0x321dca[_0xe7eb('0x33')][_0xe7eb('0x34')]};});_0x54e443[_0xe7eb('0x35')]=_[_0xe7eb('0x30')](_0x285446,_0xe7eb('0x2e'));_0x54e443[_0xe7eb('0x36')]=_['keys'](_0x1bad98[_0xe7eb('0x36')]);_0x54e443['filters']=_[_0xe7eb('0x37')](_0x54e443[_0xe7eb('0x35')],_0x54e443[_0xe7eb('0x36')]);_0x3441bc[_0xe7eb('0x38')]=_[_0xe7eb('0x37')](_0x54e443[_0xe7eb('0x35')],qs[_0xe7eb('0x39')](_0x1bad98['query']['fields']));_0x3441bc['attributes']=_0x3441bc[_0xe7eb('0x38')][_0xe7eb('0x3a')]?_0x3441bc[_0xe7eb('0x38')]:_0x54e443[_0xe7eb('0x35')];if(!_0x1bad98[_0xe7eb('0x36')]['hasOwnProperty'](_0xe7eb('0x3b'))){_0x3441bc[_0xe7eb('0x25')]=qs[_0xe7eb('0x25')](_0x1bad98['query'][_0xe7eb('0x25')]);_0x3441bc[_0xe7eb('0x22')]=qs[_0xe7eb('0x22')](_0x1bad98[_0xe7eb('0x36')][_0xe7eb('0x22')]);}_0x3441bc[_0xe7eb('0x3c')]=qs[_0xe7eb('0x3d')](_0x1bad98[_0xe7eb('0x36')][_0xe7eb('0x3d')]);_0x3441bc[_0xe7eb('0x3e')]=qs[_0xe7eb('0x3f')](_[_0xe7eb('0x40')](_0x1bad98[_0xe7eb('0x36')],_0x54e443[_0xe7eb('0x3f')]),_0x285446);if(_0x1bad98[_0xe7eb('0x36')][_0xe7eb('0x41')]){_0x3441bc['where']=_[_0xe7eb('0x42')](_0x3441bc[_0xe7eb('0x3e')],{'$or':_[_0xe7eb('0x30')](_0x285446,function(_0x47724c){if(_0x47724c[_0xe7eb('0x33')]!==_0xe7eb('0x43')){var _0x49f807={};_0x49f807[_0x47724c[_0xe7eb('0x2e')]]={'$like':'%'+_0x1bad98[_0xe7eb('0x36')][_0xe7eb('0x41')]+'%'};return _0x49f807;}})});}_0x3441bc=_[_0xe7eb('0x42')]({},_0x3441bc,_0x1bad98[_0xe7eb('0x44')]);var _0x4d9589={'where':_0x3441bc[_0xe7eb('0x3e')]};return db['SquareReport'][_0xe7eb('0x24')](_0x4d9589)[_0xe7eb('0x2b')](function(_0x71dd51){_0x224d9e[_0xe7eb('0x24')]=_0x71dd51;if(_0x1bad98[_0xe7eb('0x36')][_0xe7eb('0x45')]){_0x3441bc[_0xe7eb('0x46')]=[{'all':!![]}];}return db[_0xe7eb('0x47')][_0xe7eb('0x48')](_0x3441bc);})[_0xe7eb('0x2b')](function(_0x166cf2){_0x224d9e[_0xe7eb('0x49')]=_0x166cf2;return _0x224d9e;})[_0xe7eb('0x2b')](respondWithFilteredResult(_0x594e8b,_0x3441bc))[_0xe7eb('0x4a')](handleError(_0x594e8b,null));};exports[_0xe7eb('0x4b')]=function(_0xab3225,_0x2d6266){var _0x54cf11={'raw':!![],'where':{'id':_0xab3225[_0xe7eb('0x4c')]['id']}},_0x37de08={};_0x37de08[_0xe7eb('0x35')]=_['keys'](db[_0xe7eb('0x47')][_0xe7eb('0x31')]);_0x37de08[_0xe7eb('0x36')]=_['keys'](_0xab3225[_0xe7eb('0x36')]);_0x37de08['filters']=_[_0xe7eb('0x37')](_0x37de08['model'],_0x37de08[_0xe7eb('0x36')]);_0x54cf11[_0xe7eb('0x38')]=_[_0xe7eb('0x37')](_0x37de08[_0xe7eb('0x35')],qs['fields'](_0xab3225['query'][_0xe7eb('0x39')]));_0x54cf11[_0xe7eb('0x38')]=_0x54cf11[_0xe7eb('0x38')][_0xe7eb('0x3a')]?_0x54cf11[_0xe7eb('0x38')]:_0x37de08[_0xe7eb('0x35')];if(_0xab3225[_0xe7eb('0x36')][_0xe7eb('0x45')]){_0x54cf11[_0xe7eb('0x46')]=[{'all':!![]}];}_0x54cf11=_[_0xe7eb('0x42')]({},_0x54cf11,_0xab3225[_0xe7eb('0x44')]);return db[_0xe7eb('0x47')][_0xe7eb('0x4d')](_0x54cf11)[_0xe7eb('0x2b')](handleEntityNotFound(_0x2d6266,null))[_0xe7eb('0x2b')](respondWithResult(_0x2d6266,null))['catch'](handleError(_0x2d6266,null));};exports['create']=function(_0xd8f9a0,_0x1ae74e){return db[_0xe7eb('0x47')][_0xe7eb('0x4e')](_0xd8f9a0['body'],{})[_0xe7eb('0x2b')](respondWithResult(_0x1ae74e,0xc9))['catch'](handleError(_0x1ae74e,null));};exports[_0xe7eb('0x4f')]=function(_0x3105f2,_0xdf5a41){if(_0x3105f2[_0xe7eb('0x50')]['id']){delete _0x3105f2[_0xe7eb('0x50')]['id'];}return db[_0xe7eb('0x47')][_0xe7eb('0x4d')]({'where':{'id':_0x3105f2[_0xe7eb('0x4c')]['id']}})[_0xe7eb('0x2b')](handleEntityNotFound(_0xdf5a41,null))[_0xe7eb('0x2b')](saveUpdates(_0x3105f2[_0xe7eb('0x50')],null))[_0xe7eb('0x2b')](respondWithResult(_0xdf5a41,null))[_0xe7eb('0x4a')](handleError(_0xdf5a41,null));};exports['destroy']=function(_0x1e3af6,_0x5694ab){return db[_0xe7eb('0x47')]['find']({'where':{'id':_0x1e3af6['params']['id']}})['then'](handleEntityNotFound(_0x5694ab,null))[_0xe7eb('0x2b')](removeEntity(_0x5694ab,null))[_0xe7eb('0x4a')](handleError(_0x5694ab,null));};exports[_0xe7eb('0x51')]=function(_0x1db503,_0x3433a8){return db[_0xe7eb('0x47')]['describe']()['then'](respondWithResult(_0x3433a8,null))[_0xe7eb('0x4a')](handleError(_0x3433a8,null));};
\ No newline at end of file
+var _0xf101=['attributes','length','hasOwnProperty','nolimit','order','sort','filter','where','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','keys','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','end','error','stack','name','index','map','SquareReport','rawAttributes','fieldName','key','model','query','filters','intersection','fields'];(function(_0x740983,_0x314689){var _0x16bddc=function(_0x5d0aa3){while(--_0x5d0aa3){_0x740983['push'](_0x740983['shift']());}};_0x16bddc(++_0x314689);}(_0xf101,0x1e5));var _0x1f10=function(_0x2d36a6,_0x2f8cd0){_0x2d36a6=_0x2d36a6-0x0;var _0x59cec0=_0xf101[_0x2d36a6];return _0x59cec0;};'use strict';var emlformat=require(_0x1f10('0x0'));var rimraf=require(_0x1f10('0x1'));var zipdir=require(_0x1f10('0x2'));var jsonpatch=require(_0x1f10('0x3'));var rp=require(_0x1f10('0x4'));var moment=require(_0x1f10('0x5'));var BPromise=require(_0x1f10('0x6'));var Mustache=require(_0x1f10('0x7'));var util=require('util');var path=require(_0x1f10('0x8'));var sox=require(_0x1f10('0x9'));var csv=require(_0x1f10('0xa'));var ejs=require(_0x1f10('0xb'));var fs=require('fs');var fs_extra=require(_0x1f10('0xc'));var _=require(_0x1f10('0xd'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x1f10('0xe'));var deskjs=require(_0x1f10('0xf'));var toCsv=require(_0x1f10('0xa'));var querystring=require(_0x1f10('0x10'));var Papa=require(_0x1f10('0x11'));var Redis=require(_0x1f10('0x12'));var authService=require(_0x1f10('0x13'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x1f10('0x14'))('api');var utils=require(_0x1f10('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x1f10('0x16'));var db=require(_0x1f10('0x17'))['db'];function respondWithStatusCode(_0x3bfc30,_0x2a4bff){_0x2a4bff=_0x2a4bff||0xcc;return function(_0x5b0401){if(_0x5b0401){return _0x3bfc30[_0x1f10('0x18')](_0x2a4bff);}return _0x3bfc30[_0x1f10('0x19')](_0x2a4bff)['end']();};}function respondWithResult(_0x5153f7,_0x4db1f9){_0x4db1f9=_0x4db1f9||0xc8;return function(_0x4f4806){if(_0x4f4806){return _0x5153f7[_0x1f10('0x19')](_0x4db1f9)[_0x1f10('0x1a')](_0x4f4806);}};}function respondWithFilteredResult(_0x543aaa,_0x3c1591){return function(_0x30174a){if(_0x30174a){var _0x1a27c1=typeof _0x3c1591[_0x1f10('0x1b')]===_0x1f10('0x1c')&&typeof _0x3c1591[_0x1f10('0x1d')]===_0x1f10('0x1c');var _0x52d506=_0x30174a[_0x1f10('0x1e')];var _0x42132d=_0x1a27c1?0x0:_0x3c1591[_0x1f10('0x1b')];var _0x4b3019=_0x1a27c1?_0x30174a[_0x1f10('0x1e')]:_0x3c1591[_0x1f10('0x1b')]+_0x3c1591[_0x1f10('0x1d')];var _0x261d52;if(_0x4b3019>=_0x52d506){_0x4b3019=_0x52d506;_0x261d52=0xc8;}else{_0x261d52=0xce;}_0x543aaa[_0x1f10('0x19')](_0x261d52);return _0x543aaa[_0x1f10('0x1f')](_0x1f10('0x20'),_0x42132d+'-'+_0x4b3019+'/'+_0x52d506)[_0x1f10('0x1a')](_0x30174a);}return null;};}function patchUpdates(_0x21853c){return function(_0x13b54b){try{jsonpatch[_0x1f10('0x21')](_0x13b54b,_0x21853c,!![]);}catch(_0x2afe1f){return BPromise[_0x1f10('0x22')](_0x2afe1f);}return _0x13b54b[_0x1f10('0x23')]();};}function saveUpdates(_0xcfbbd8,_0x56a2c6){return function(_0x226a8e){if(_0x226a8e){return _0x226a8e[_0x1f10('0x24')](_0xcfbbd8)[_0x1f10('0x25')](function(_0x3d621a){return _0x3d621a;});}return null;};}function removeEntity(_0x4cde62,_0x104267){return function(_0xe2d1dd){if(_0xe2d1dd){return _0xe2d1dd[_0x1f10('0x26')]()['then'](function(){_0x4cde62[_0x1f10('0x19')](0xcc)[_0x1f10('0x27')]();});}};}function handleEntityNotFound(_0x4752e2,_0x5c52f6){return function(_0x2718c8){if(!_0x2718c8){_0x4752e2['sendStatus'](0x194);}return _0x2718c8;};}function handleError(_0x4a64e8,_0x825a2a){_0x825a2a=_0x825a2a||0x1f4;return function(_0x5447b3){logger[_0x1f10('0x28')](_0x5447b3[_0x1f10('0x29')]);if(_0x5447b3[_0x1f10('0x2a')]){delete _0x5447b3['name'];}_0x4a64e8['status'](_0x825a2a)['send'](_0x5447b3);};}exports[_0x1f10('0x2b')]=function(_0x15e4fb,_0x3e885c){var _0x2f93a8={},_0x3ff592={},_0x32dbec={'count':0x0,'rows':[]};var _0xbd8660=_[_0x1f10('0x2c')](db[_0x1f10('0x2d')][_0x1f10('0x2e')],function(_0x400cbd){return{'name':_0x400cbd[_0x1f10('0x2f')],'type':_0x400cbd['type'][_0x1f10('0x30')]};});_0x3ff592[_0x1f10('0x31')]=_['map'](_0xbd8660,_0x1f10('0x2a'));_0x3ff592[_0x1f10('0x32')]=_['keys'](_0x15e4fb['query']);_0x3ff592[_0x1f10('0x33')]=_[_0x1f10('0x34')](_0x3ff592['model'],_0x3ff592['query']);_0x2f93a8['attributes']=_['intersection'](_0x3ff592[_0x1f10('0x31')],qs['fields'](_0x15e4fb[_0x1f10('0x32')][_0x1f10('0x35')]));_0x2f93a8[_0x1f10('0x36')]=_0x2f93a8[_0x1f10('0x36')][_0x1f10('0x37')]?_0x2f93a8[_0x1f10('0x36')]:_0x3ff592[_0x1f10('0x31')];if(!_0x15e4fb[_0x1f10('0x32')][_0x1f10('0x38')](_0x1f10('0x39'))){_0x2f93a8[_0x1f10('0x1d')]=qs[_0x1f10('0x1d')](_0x15e4fb['query']['limit']);_0x2f93a8['offset']=qs[_0x1f10('0x1b')](_0x15e4fb['query'][_0x1f10('0x1b')]);}_0x2f93a8[_0x1f10('0x3a')]=qs[_0x1f10('0x3b')](_0x15e4fb[_0x1f10('0x32')][_0x1f10('0x3b')]);_0x2f93a8['where']=qs[_0x1f10('0x33')](_['pick'](_0x15e4fb[_0x1f10('0x32')],_0x3ff592[_0x1f10('0x33')]),_0xbd8660);if(_0x15e4fb[_0x1f10('0x32')][_0x1f10('0x3c')]){_0x2f93a8[_0x1f10('0x3d')]=_[_0x1f10('0x3e')](_0x2f93a8[_0x1f10('0x3d')],{'$or':_['map'](_0xbd8660,function(_0x40e455){if(_0x40e455[_0x1f10('0x3f')]!==_0x1f10('0x40')){var _0x27f029={};_0x27f029[_0x40e455['name']]={'$like':'%'+_0x15e4fb[_0x1f10('0x32')][_0x1f10('0x3c')]+'%'};return _0x27f029;}})});}_0x2f93a8=_[_0x1f10('0x3e')]({},_0x2f93a8,_0x15e4fb[_0x1f10('0x41')]);var _0x5f09fb={'where':_0x2f93a8[_0x1f10('0x3d')]};return db['SquareReport']['count'](_0x5f09fb)[_0x1f10('0x25')](function(_0x527820){_0x32dbec[_0x1f10('0x1e')]=_0x527820;if(_0x15e4fb['query'][_0x1f10('0x42')]){_0x2f93a8[_0x1f10('0x43')]=[{'all':!![]}];}return db[_0x1f10('0x2d')][_0x1f10('0x44')](_0x2f93a8);})[_0x1f10('0x25')](function(_0x44bfc3){_0x32dbec[_0x1f10('0x45')]=_0x44bfc3;return _0x32dbec;})['then'](respondWithFilteredResult(_0x3e885c,_0x2f93a8))[_0x1f10('0x46')](handleError(_0x3e885c,null));};exports['show']=function(_0x413d5f,_0xaefc1f){var _0x5bb414={'raw':!![],'where':{'id':_0x413d5f[_0x1f10('0x47')]['id']}},_0x32c253={};_0x32c253[_0x1f10('0x31')]=_[_0x1f10('0x48')](db[_0x1f10('0x2d')][_0x1f10('0x2e')]);_0x32c253['query']=_[_0x1f10('0x48')](_0x413d5f[_0x1f10('0x32')]);_0x32c253[_0x1f10('0x33')]=_[_0x1f10('0x34')](_0x32c253[_0x1f10('0x31')],_0x32c253[_0x1f10('0x32')]);_0x5bb414[_0x1f10('0x36')]=_[_0x1f10('0x34')](_0x32c253[_0x1f10('0x31')],qs['fields'](_0x413d5f[_0x1f10('0x32')]['fields']));_0x5bb414['attributes']=_0x5bb414[_0x1f10('0x36')][_0x1f10('0x37')]?_0x5bb414[_0x1f10('0x36')]:_0x32c253[_0x1f10('0x31')];if(_0x413d5f[_0x1f10('0x32')][_0x1f10('0x42')]){_0x5bb414[_0x1f10('0x43')]=[{'all':!![]}];}_0x5bb414=_[_0x1f10('0x3e')]({},_0x5bb414,_0x413d5f[_0x1f10('0x41')]);return db[_0x1f10('0x2d')][_0x1f10('0x49')](_0x5bb414)[_0x1f10('0x25')](handleEntityNotFound(_0xaefc1f,null))[_0x1f10('0x25')](respondWithResult(_0xaefc1f,null))[_0x1f10('0x46')](handleError(_0xaefc1f,null));};exports[_0x1f10('0x4a')]=function(_0x46d76,_0x7ceb79){return db[_0x1f10('0x2d')][_0x1f10('0x4a')](_0x46d76[_0x1f10('0x4b')],{})[_0x1f10('0x25')](respondWithResult(_0x7ceb79,0xc9))[_0x1f10('0x46')](handleError(_0x7ceb79,null));};exports[_0x1f10('0x24')]=function(_0x38a1ab,_0x51d27b){if(_0x38a1ab['body']['id']){delete _0x38a1ab[_0x1f10('0x4b')]['id'];}return db[_0x1f10('0x2d')]['find']({'where':{'id':_0x38a1ab[_0x1f10('0x47')]['id']}})[_0x1f10('0x25')](handleEntityNotFound(_0x51d27b,null))[_0x1f10('0x25')](saveUpdates(_0x38a1ab[_0x1f10('0x4b')],null))[_0x1f10('0x25')](respondWithResult(_0x51d27b,null))[_0x1f10('0x46')](handleError(_0x51d27b,null));};exports['destroy']=function(_0x28f068,_0x5717f0){return db['SquareReport'][_0x1f10('0x49')]({'where':{'id':_0x28f068['params']['id']}})['then'](handleEntityNotFound(_0x5717f0,null))[_0x1f10('0x25')](removeEntity(_0x5717f0,null))[_0x1f10('0x46')](handleError(_0x5717f0,null));};exports[_0x1f10('0x4c')]=function(_0x1c30b8,_0x461d24){return db[_0x1f10('0x2d')][_0x1f10('0x4c')]()[_0x1f10('0x25')](respondWithResult(_0x461d24,null))[_0x1f10('0x46')](handleError(_0x461d24,null));};
\ No newline at end of file