fix: case-sensitivity in apps path (#6552)
* fix: lowercase slug * fix: make fallback blocking
This commit is contained in:
parent
1a19261b8f
commit
da0ea5d9d0
|
@ -54,7 +54,7 @@ export const getStaticPaths: GetStaticPaths<{ slug: string }> = async () => {
|
|||
|
||||
return {
|
||||
paths,
|
||||
fallback: false,
|
||||
fallback: "blocking",
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -62,7 +62,7 @@ export const getStaticProps = async (ctx: GetStaticPropsContext) => {
|
|||
if (typeof ctx.params?.slug !== "string") return { notFound: true };
|
||||
|
||||
const app = await prisma.app.findUnique({
|
||||
where: { slug: ctx.params.slug },
|
||||
where: { slug: ctx.params.slug.toLowerCase() },
|
||||
});
|
||||
|
||||
if (!app) return { notFound: true };
|
||||
|
|
Loading…
Reference in New Issue
Block a user