Skip to content
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: disallow duplicate entries for users #447

Merged
merged 4 commits into from
Aug 29, 2023

Conversation

mbhrznr
Copy link
Contributor

@mbhrznr mbhrznr commented Aug 26, 2023

closes #377.

this disallows users from submitting duplicate entries.
upon submission all user entries are checked for uniqueness on either title or url.

@mbhrznr
Copy link
Contributor Author

mbhrznr commented Aug 26, 2023

/submit already has some checks in place, yet we always return an empty response with status 400.
would it make sense to return more distinct responses in terms of status and (potentially) message?

@iuioiua
Copy link
Contributor

iuioiua commented Aug 26, 2023

Yep! I think a HTTP 409 status with a concise text body message would be fitting 👍🏾

routes/submit/index.tsx Outdated Show resolved Hide resolved
routes/submit/index.tsx Outdated Show resolved Hide resolved
routes/submit/index.tsx Outdated Show resolved Hide resolved
routes/submit/index.tsx Outdated Show resolved Hide resolved
routes/submit/index.tsx Outdated Show resolved Hide resolved
routes/submit/index.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made some tweaks, and now, LGTM! Thanks, Michael 🙏🏾

@iuioiua iuioiua merged commit 0f30692 into denoland:main Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

proposal: disallow duplicate entries
2 participants