update redirects to post fastify 5.x.x style

This commit is contained in:
Holly Stubbs 2024-09-20 00:03:32 +01:00
parent 1f69eff4bb
commit 1d9e0d1dd2
Signed by: tgpholly
GPG Key ID: B8583C4B7D18119E
1 changed files with 3 additions and 3 deletions

View File

@ -37,12 +37,12 @@ export default class RequestCtx {
const controllerName = controller ?? this.controllerName; const controllerName = controller ?? this.controllerName;
if (action === "index") { if (action === "index") {
if (controllerName === "home") { if (controllerName === "home") {
return this.res.redirect(302, `/`); return this.res.redirect(`/`, 302);
} else { } else {
return this.res.redirect(302, `/${controllerName}`); return this.res.redirect(`/${controllerName}`, 302);
} }
} else { } else {
return this.res.redirect(302, `/${controllerName}/${action}`); return this.res.redirect(`/${controllerName}/${action}`, 302);
} }
} }