- add error if data not found export transaction history
This commit is contained in:
parent
b06f96c95b
commit
9db0c6a714
|
@ -2220,12 +2220,7 @@ export class TransactionService {
|
|||
|
||||
|
||||
|
||||
if (!data) {
|
||||
return {
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
message: 'No data to export'
|
||||
};
|
||||
} else {
|
||||
try {
|
||||
let rows = [];
|
||||
|
||||
// First create the array of keys/net_total so that we can sort it:
|
||||
|
@ -2325,6 +2320,8 @@ export class TransactionService {
|
|||
|
||||
//returning the path of file
|
||||
return File;
|
||||
} catch (e) {
|
||||
throw new HttpException('No data to export', HttpStatus.NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user