fix event content-type

This commit is contained in:
lesion
2022-06-01 14:13:58 +02:00
parent 9b22892466
commit 0764617e5d
3 changed files with 13 additions and 5 deletions

View File

@@ -224,7 +224,8 @@ module.exports = {
},
async APRedirect (req, res, next) {
if (!req.accepts('html')) {
const acceptJson = req.accepts('html', 'application/activity+json') === 'application/activity+json'
if (acceptJson) {
const eventController = require('../server/api/controller/event')
const event = await eventController._get(req.params.slug)
if (event) {