Verifying query type in `getServerSideProps`
Hello. I have a getServerSideProps function and would like to verify the query to avoid security vulnerabilities and return a 404 page:
I've tried validating query with a zod schema, but that doesn't seem to let TS know that query has the type QueryType. How do i verify this in a way which works well for TS?
0 Replies