add direct invitation link
All checks were successful
deploy / build-and-deploy (push) Successful in 21s
All checks were successful
deploy / build-and-deploy (push) Successful in 21s
This commit is contained in:
18
src/pages/signup/[...hash].astro
Normal file
18
src/pages/signup/[...hash].astro
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
import { db } from '@db/database.ts';
|
||||
import Signup from '@app/website/signup/Signup.astro';
|
||||
|
||||
const { hash } = Astro.params;
|
||||
|
||||
const directSignup = await db.getDirectSignupByHash({ hash: hash! });
|
||||
if (!directSignup) return new Response(null, { status: 404 });
|
||||
---
|
||||
|
||||
<Signup
|
||||
signupHash={hash}
|
||||
signupDisabled={directSignup.user
|
||||
? {
|
||||
message: 'Es hat sich bereits jemand mit diesem Einladungslink registriert'
|
||||
}
|
||||
: undefined}
|
||||
/>
|
||||
Reference in New Issue
Block a user