mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
refactor(nestjs): export module
This commit is contained in:
13
packages/server/src/modules/Export/Export.utils.ts
Normal file
13
packages/server/src/modules/Export/Export.utils.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { ACCEPT_TYPE } from '@/common/constants/http.constants';
|
||||
import { ExportFormat } from './common';
|
||||
|
||||
export const convertAcceptFormatToFormat = (accept: string): ExportFormat => {
|
||||
switch (accept) {
|
||||
case ACCEPT_TYPE.APPLICATION_CSV:
|
||||
return ExportFormat.Csv;
|
||||
case ACCEPT_TYPE.APPLICATION_PDF:
|
||||
return ExportFormat.Pdf;
|
||||
case ACCEPT_TYPE.APPLICATION_XLSX:
|
||||
return ExportFormat.Xlsx;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user