~akiva/user-profiles-api-demo

9358d9a11ef9824ec335078745aba505082fd45e — Akiva Levy 2 years ago 3dc2151
Add API endpoints to documentation
1 files changed, 14 insertions(+), 0 deletions(-)

M README.md
M README.md => README.md +14 -0
@@ 70,6 70,20 @@ Returning:

## Endpoints

The API consists of the following endpoints:

- `POST /auth/register(/)`: register a user
- `POST /auth/login(/)`: log in with a username and password 
- `GET /users(/)`: \* list users
- `POST /users(/)`: \* register a new user (redundant, to be removed)
- `GET /users/<user-id>(/)`: \* view a user profile
- `DELETE /users/<user-id>(/)`: \* delete user profile (only if the
  profile is your own)
- `PUT /auth/register(/)`: \* update user profile (only if the profile
  is your own)

\* Request requires authentication via JWT.

## Tests

To run the test suite, run via _npm_, `npm t`.