mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:27:09 +00:00
Use setContentDisposition()
This commit is contained in:
@@ -3,6 +3,7 @@ const yaml = require('./yaml');
|
||||
const geojson = require('./geojson');
|
||||
const seis = require('./seis');
|
||||
const csv = require('./csv');
|
||||
const setContentDisposition = require('../../../../lib/utils/setContentDisposition');
|
||||
|
||||
|
||||
module.exports = async function (req, res, next) {
|
||||
@@ -19,6 +20,7 @@ module.exports = async function (req, res, next) {
|
||||
|
||||
if (mimetype) {
|
||||
res.set("Content-Type", mimetype);
|
||||
setContentDisposition(req, res);
|
||||
await handlers[mimetype](req, res, next);
|
||||
} else {
|
||||
res.status(406).send();
|
||||
|
||||
Reference in New Issue
Block a user