Fixes 404 issue with slug when trailing whitespaces exist

pull/374/head
Alex van Andel 2021-07-20 13:27:36 +00:00
parent b9718661e6
commit 7098e75841
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
if (req.method == "PATCH" || req.method == "POST") {
const data = {
title: req.body.title,
slug: req.body.slug,
slug: req.body.slug.trim(),
description: req.body.description,
length: parseInt(req.body.length),
hidden: req.body.hidden,