-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add functionality to update acknowledgement with path request #87
base: develop
Are you sure you want to change the base?
Conversation
controllers/auth.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can ignore this file as it is to fix the typescript eslint issue and got caught in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good PR :)
}); | ||
|
||
if (updatedData && updatedData.acknowledgement === status) { | ||
return res.json({ message: 'Acknowledgement status updated' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move messages to constant files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the message is specifically used for this controller will this change be required?
attendeeId: z.preprocess((a) => Number(a), z.number().positive()), | ||
}), | ||
body: z.object({ | ||
status: z.enum(['ACCEPTED', 'DECLINED', 'TENTATIVE']), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too. Let us keep it in constants
For #51
Changes made:
acknowledgment
for an event.Note
There are four types of
acknowledgments
an attendee can have:The API endpoint will only accept
Accepted
,Declined
&Tentative
as the new status to update because we wouldn't want anacknowledgment
to be set back toAwaiting
after the user has taken action to mark their acknowledgment.Todo:
authentication
middleware.