This document serves as a guide to the various backend routes used in a typical backend application. Each route is listed with its location in the file and a brief description of its purpose. Use keywords like "verify token", "get user", "delete user", "add user", and "update user" to quickly find the relevant routes using "Ctrl + F".
-
Auth Routes
-
Test Routes
-
User Routes
- Location: Source
- Description: Middleware to verify the access token attached to the request's cookies. This ensures that only users with appropriate access tokens can access backend routes.
- Location: Source
- Description: Verifies the access token provided as a URL parameter. Returns the decoded token's UID if valid.
- Location: Source
- Description: Retrieves all users from the database. Useful for testing database connectivity and query execution.
- Location: Source
- Description: Retrieves all users from the database.
- Location: Source
- Description: Retrieves a specific user by their alphanumeric user ID.
- Location: Source
- Description: Deletes a specific user by their alphanumeric user ID, both in Firebase and the NPO database.
- Location: Source
- Description: Adds a new user to the database with the provided email, user ID, role, and registration status.
- Location: Source
- Description: Updates the registered flag for a specific user by their alphanumeric user ID.