Skip to content

Commit

Permalink
fix: confirm events on save
Browse files Browse the repository at this point in the history
  • Loading branch information
mplewis committed Oct 20, 2024
1 parent c680735 commit 947097a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
- [ ] When date is too far away, use year in preview
- [ ] Fix `Test Event` appearing as `Test+Event` in the Hooray created confirmation message
- [ ] Use proper preview domain in emails from staging
- [ ] Delete unconfirmed events
- [ ] Delete completed events
- [x] Store editor's timezone with each event and use it to generate preview image times
- [x] .ics function + link
- [x] Add To icons
Expand Down
5 changes: 4 additions & 1 deletion api/src/services/events/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ export const updateEvent: MutationResolvers['updateEvent'] = async ({
where: { editToken },
select: { start: true },
})
const event = await db.event.update({ data: input, where: { editToken } })
const event = await db.event.update({
data: { ...input, confirmed: true },
where: { editToken },
})

if (input.start) {
const startDelta = dayjs(oldStart).diff(input.start)
Expand Down

0 comments on commit 947097a

Please sign in to comment.