Skip to content

Get users endpoint (Deprecated)

Alvin Cheng edited this page Jun 8, 2023 · 1 revision

Description

This is the get user endpoint, this endpoint will get all the user's information from the MongoDB database. This endpoint does not have any arguments, the endpoint will return '200' on success, '401' on an invalid API key or '500' on an internal server error. Furthermore, the endpoint's source is at /src/endpoints/getUsers.ts. As a side note, this endpoint is no longer used by the Chill&chat frontend.

Example

fetch("http://<URL>/api/get-users?key=<YOUR_API_KEY>")
  .then((res) => {
    console.log(res);
  })
  .catch((err) => {
    console.error(err);
  });
Clone this wiki locally