-
Notifications
You must be signed in to change notification settings - Fork 158
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
feat: adding notification for new votes #350
Conversation
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.
Thanks for this! Can you please make sure you account for the behaviour pointed out in #351?
routes/api/vote.ts
Outdated
status = 201; | ||
await createVote(vote); | ||
|
||
if (item!.userId != user!.id) { |
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.
if (item!.userId != user!.id) { | |
if (item!.userId !== user!.id) { |
Hm, I would've thought that checking for item === null || user === null
above would've negated the need for the need for the non-null assertion operator !
.
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.
LGTM! Thanks you.
new we only have notifications for new comments on a user's post
this PR adds notifications for new upvotes