Skip to content

Conversation

@nickbar01234
Copy link
Collaborator

@nickbar01234 nickbar01234 commented Oct 23, 2023

Description

Add "quality-of-life" enhancement to backend development.

  1. fetch HTTP request methods are constrained to GET, POST, PUT, PATCH, and DELETE. These methods align with Next.js route handlers specifications. Typescript can now provide us type hints

    image

  2. Add a enum for common status code that I anticipated would be useful for our development. The idea is that it's easier to understand the intent of the status code from the enums, instead of trying to remember what all the numbers represent.

Possible Downsides

The type-hint for HTTP request methods doesn't raise a compilation error with typo - i.e someone can still type a bogus HTTP method.

@vercel
Copy link

vercel bot commented Oct 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
the-legacy-project2 ✅ Ready (Inspect) Visit Preview Oct 23, 2023 4:27pm

@nickbar01234 nickbar01234 added the enhancement New feature or request label Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants