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

chore: clean zod validation in database api endpoints #109

Merged

Conversation

onmax
Copy link
Contributor

@onmax onmax commented May 16, 2024

Implemented better zod code to avoid duplication of validation.

Also, with this change the field params will be empty array by default, so users will be able to do something like:

/api/_hub/database/all 

body: { "query": "SELECT * FROM users" }

Before

It was an error. Invalid type for params

@onmax onmax force-pushed the onmax/default-empty-params-database-endpoint branch from 71762c1 to 7ad74a3 Compare May 16, 2024 13:19
@Atinux Atinux requested a review from farnabaz May 16, 2024 15:37
@Atinux Atinux merged commit d06beb2 into nuxt-hub:main May 22, 2024
3 of 4 checks passed
@onmax onmax deleted the onmax/default-empty-params-database-endpoint branch May 23, 2024 06:21
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.

None yet

3 participants