From 9358d9a11ef9824ec335078745aba505082fd45e Mon Sep 17 00:00:00 2001 From: Akiva Levy Date: Fri, 24 Dec 2021 02:59:20 -0800 Subject: [PATCH] Add API endpoints to documentation --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index d97152a..a16b036 100644 --- a/README.md +++ b/README.md @@ -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/(/)`: \* view a user profile +- `DELETE /users/(/)`: \* 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`. -- 2.45.2