Fix?
This commit is contained in:
@@ -8,6 +8,7 @@ const page = Number(Astro.url.searchParams.get("p"));
|
||||
|
||||
const user = await getCurrentUser(Astro);
|
||||
|
||||
|
||||
if (!user) {
|
||||
return Astro.redirect("/auth/login");
|
||||
}
|
||||
@@ -23,7 +24,7 @@ const totalPageCount = await prisma.aufnahme.count({
|
||||
: {},
|
||||
});
|
||||
|
||||
if (page < 1 || page > totalPageCount && totalPageCount > 0) {
|
||||
if (page < 1 || page > totalPageCount) {
|
||||
return Astro.redirect("/dashboard/objekte?p=1");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user