-
Notifications
You must be signed in to change notification settings - Fork 0
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
Migrated all API interfaces from docs to shared #42
Conversation
I don't know why does the test fail... |
No, absolutely DO NOT DO THIS. Using {} When this gets to a route handler, body as LoginRequest You are telling the TypeScript compiler to assume that For the same reason, do not ever cast user input. Always follow these steps when accessing user-provided objects:
|
okay how about this, now it's only migrating, the Request types are left in shared for future front end use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
From now on, use the API defined interfaces ensure the response type is correct as shangzhe has done in the me endpoint