| title | README |
|---|---|
| date | 2024-12-04 11:15 |
| include_toc | true |
Backend for the AquaTrack app, part of the GoIT FSON 105 Team Project.
This repository contains the backend code for the AquaTrack app, designed to help users track their water consumption and improve their hydration habits.
- Register User (POST /api/users/register)
- Method: POST
- URL: http://localhost:8080/api/users/register
- Body:
{
"username": "newuser",
"email": "newuser@example.com",
"password": "12345678"
}- Login User (POST /api/users/login)
- Method: POST
- URL: http://localhost:8080/api/users/login
- Body: (example data)
{
"email": "newuser@example.com",
"password": "12345678"
}- Logout User (POST /api/users/logout)
- Method: POST
- URL: http://localhost:8080/api/users/logout
- Get User Info (GET /api/users/)
- Method: GET
- URL: http://localhost:8080/api/users/
- Headers: Include the Authorization token.
- Get User Count (GET /api/users/count-user)
- Method: GET
- URL: http://localhost:8080/api/users/count-user
- Send Password Reset Email (POST /api/users/send-reset-email)
- Method: POST
- URL: http://localhost:8080/api/users/send-reset-email
- Body:
{
"email": "newuser@example.com"
}- Reset Password (POST http://localhost:8080/api/users/reset-pwd)
- Method: POST
- URL: http://localhost:8080/api/users/users/reset-pwd
- Body:
{
"token": "token",
"password": "password"
}- Get Water Data (GET /api/water/)
- Method: GET
- URL: http://localhost:8080/api/water/
- Headers: Include the Authorization token.
- Get Water Data Per Day (GET /api/water/water-per-day)
- Method: GET
- URL: http://localhost:8080/api/water/water-per-day
- Headers: Include the Authorization token.
- Create Water Data (POST /api/water/)
- Method: POST
- URL: http://localhost:8080/api/water/
- Headers: Include the Authorization token.
- Body:
{
"date": "2024-12-04",
"amount": 250
}- Update Water Data (PATCH /api/water/:waterId)
- Method: PATCH
- URL: http://localhost:8080/api/water/:waterId
- Headers: Include the Authorization token.
- Body: (example data for updating water data)
{
"amount": 300
}- Delete Water Data (DELETE /api/water/:waterId)
- Method: DELETE
- URL: http://localhost:8080/api/water/:waterId
- Headers: Include the Authorization token.