diff options
author | Raphael Kabo <raphaelkabo@hey.com> | 2024-02-25 17:56:25 +0000 |
---|---|---|
committer | Raphael Kabo <raphaelkabo@hey.com> | 2024-02-25 17:56:25 +0000 |
commit | cd0f291eb1a608589fcc2c1875fa7099ed8e2c51 (patch) | |
tree | 05b1d8b1d63baed174883cc96807051e530969a2 /src/routes/group.ts | |
parent | b17238eb2840553c69fc2dae168be557afbcee9c (diff) |
feat: optionally restrict event creation to specific emails
Diffstat (limited to 'src/routes/group.ts')
-rw-r--r-- | src/routes/group.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/routes/group.ts b/src/routes/group.ts index 40dcccb..34377b0 100644 --- a/src/routes/group.ts +++ b/src/routes/group.ts @@ -9,6 +9,7 @@ import EventGroup from "../models/EventGroup.js"; import { sendEmailFromTemplate } from "../lib/email.js"; import { marked } from "marked"; import { renderPlain } from "../util/markdown.js"; +import { checkMagicLink } from "../lib/middleware.js"; const config = getConfig(); @@ -32,6 +33,7 @@ const router = Router(); router.post( "/group", upload.single("imageUpload"), + checkMagicLink, async (req: Request, res: Response) => { const { data: groupData, errors } = validateGroupData(req.body); if (errors && errors.length > 0) { |