Skip to content
This repository was archived by the owner on Oct 29, 2025. It is now read-only.

Commit c0c164b

Browse files
committed
Made the calendar login page redirect to the calendar if no password is required.
1 parent f554c38 commit c0c164b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/routes/calendar/[slug]/login/+page.server.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ export async function load({ locals, params }) {
1717
return redirect(301, "/");
1818
}
1919

20+
if (!calendar.password) {
21+
return redirect(301, `/calendar/${params.slug}`);
22+
}
23+
2024
return {
2125
name: calendar.name,
2226
id: calendar.id,

0 commit comments

Comments
 (0)