Skip to content

Commit

Permalink
feat: xsl export
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeen committed Jan 22, 2022
1 parent 6164ad3 commit 4a3c0e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/controllers/project.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
} from '../utils/data-assertions';

import { createProjectRecordsFromCsv } from '../utils/csv-utils';
import {createXlsFromSequelizeResults, sendXls} from '../utils/xls';
import { createXlsFromSequelizeResults, sendXls } from '../utils/xls';
import * as stream from "stream";

export const create = async (req, res) => {
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/units.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from '../utils/data-assertions';

import { createUnitRecordsFromCsv } from '../utils/csv-utils';
import {createXlsFromSequelizeResults} from "../utils/xls.js";
import { createXlsFromSequelizeResults, sendXls } from "../utils/xls";

export const create = async (req, res) => {
try {
Expand Down Expand Up @@ -146,7 +146,7 @@ export const findAll = async (req, res) => {
if (!xls) {
return res.json(response);
} else {
createXlsFromSequelizeResults(response, Unit);
return sendXls(Unit.name, createXlsFromSequelizeResults(response, Unit), res);
}

};
Expand Down

0 comments on commit 4a3c0e8

Please sign in to comment.