This commit is contained in:
Moritz Utcke
2025-08-04 19:33:17 -04:00
parent f56684a6e8
commit cbfa49b7bc
6 changed files with 44 additions and 47 deletions

View File

@@ -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");
}