We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Create User

We've written the SQL query, now it's time to write the API handler that will allow users to create a new user.

Assignment

Request:

{
  "email": "[email protected]"
}

Response:

HTTP 201 Created

{
  "id": "50746277-23c6-4d85-a890-564c0044c2fb",
  "email": "[email protected]",
  "createdAt": "2021-07-07T00:00:00Z",
  "updatedAt": "2021-07-07T00:00:00Z"
}

This ensures that this extremely dangerous endpoint can only be accessed in a local development environment.

Run and submit the CLI tests.