You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a POST route handler at /api/users that accepts form data and creates a User record using the form data. The form data will include the following fields: inviteToken and password.
If there is not a UserInvite record with the given token, then POST /api/users returns a 404 status code with JSON body {"message": "Invite does not exist"}
If the UserInvite record with the given token is expired, then POST /api/users returns a 400 status code with JSON body {"message": "Invite has expired"}
If there is already a User record with the given email, then POST /api/users returns a 409 status code with JSON body {"message": "User already exists"}
POST /api/users creates a new User record and returns a 200 status code
Description
Create a
POST
route handler at/api/users
that accepts form data and creates aUser
record using the form data. The form data will include the following fields:inviteToken
andpassword
.Success Criteria
UserInvite
record with the given token, thenPOST /api/users
returns a404
status code with JSON body{"message": "Invite does not exist"}
UserInvite
record with the given token is expired, thenPOST /api/users
returns a400
status code with JSON body{"message": "Invite has expired"}
User
record with the given email, thenPOST /api/users
returns a409
status code with JSON body{"message": "User already exists"}
POST /api/users
creates a newUser
record and returns a200
status codeargon2
The text was updated successfully, but these errors were encountered: