excel export (wip)
This commit is contained in:
@ -12,6 +12,7 @@ import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { all } from "axios";
|
||||
import { logger } from "src/helpers/common";
|
||||
import { excel } from "src/helpers/excel";
|
||||
|
||||
/**
|
||||
*
|
||||
@ -432,7 +433,13 @@ export default async function handler(req, res) {
|
||||
case "getAllPublishersWithStatistics":
|
||||
let noEndDate = common.parseBool(req.query.noEndDate);
|
||||
res.status(200).json(await dataHelper.getAllPublishersWithStatisticsMonth(day, noEndDate));
|
||||
|
||||
case "exportPublishersExcel":
|
||||
try {
|
||||
await excel.ExportPublishersToExcel(req, res);
|
||||
} catch (error) {
|
||||
console.error(JSON.stringify(error));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
res.status(200).json({
|
||||
"message": "no action '" + action + "' found"
|
||||
|
Reference in New Issue
Block a user