update redirects to post fastify 5.x.x style
This commit is contained in:
parent
1f69eff4bb
commit
1d9e0d1dd2
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue