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

Empty bookmark #225 #227

Closed
wants to merge 1 commit into from

Conversation

kamtschatka
Copy link
Collaborator

preventing the creation of empty bookmarks in the UI and the rest api
updated gitignore

preventing the creation of empty bookmarks in the UI and the rest api
updated gitignore
Comment on lines +207 to +213
} else if (input.type === "text") {
if (!input.text) {
throw new TRPCError({
message: "Creating empty bookmarks is not allowed",
code: "BAD_REQUEST",
});
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't typically do input validation on the code. This kind of validation should live in the zod schema. However, I don't really think this is something worth enforcing on the server side anyways.

@kamtschatka kamtschatka deleted the no-empty-bookmarks branch June 16, 2024 08:47
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.

2 participants