This repository is used to interact with our front application for managing data and sending email notifications to users.
Check if you have installed the following application :
- Docker
$ cp .env.sample .env
$ touch .env
Modify the file with the value you want
# Configure database name, user and password.
POSTGRES_DB=your_db_name
POSTGRES_USER=your_db_user
POSTGRES_PASSWORD=your_db_password
# Database manager PGADMIN
PGADMIN_DEFAULT_EMAIL=your_email
PGADMIN_DEFAULT_PASSWORD=your_password
$ docker-compose build
$ docker-compose up -d
$ docker-compose run --rm api python manage.py makemigrations
$ docker-compose run --rm api python manage.py migrate
Use -d if you want to detach the container
API | Url | Route | Method |
---|---|---|---|
get every users | 0.0.0.0:8000 | /users/ | GET |
get user | 0.0.0.0:8000 | /users/<id_user> | GET |
add user | 0.0.0.0:8000 | /users/add | POST |
update user | 0.0.0.0:8000 | /users/update | PATCH |
delete user | 0.0.0.0:8000 | /users/delete/<id_user> | DELETE |
API | Url | Route | Method |
---|---|---|---|
get every roles | 0.0.0.0:8000 | /roles/ | GET |
get role | 0.0.0.0:8000 | /roles/<id_role> | GET |
add role | 0.0.0.0:8000 | /roles/add | POST |
update role | 0.0.0.0:8000 | /roles/update | PATCH |
delete role | 0.0.0.0:8000 | /roles/delete/<id_role> | DELETE |
API | Url | Route | Method |
---|---|---|---|
get every promotions | 0.0.0.0:8000 | /roles/ | GET |
get promotion | 0.0.0.0:8000 | /promotions/<id_promotion> | GET |
add promotion | 0.0.0.0:8000 | /promotions/add | POST |
update promotion | 0.0.0.0:8000 | /promotions/update | PATCH |
delete promotion | 0.0.0.0:8000 | /promotions/delete/<id_promotion> | DELETE |
API | Url | Route | Method |
---|---|---|---|
get every santas | 0.0.0.0:8000 | /santa/ | GET |
get santa | 0.0.0.0:8000 | /santa/<id_santa> | GET |
get active santa | 0.0.0.0:8000 | /santa/active | GET |
add santa | 0.0.0.0:8000 | /santa/add | POST |
update santa | 0.0.0.0:8000 | /santa/update/<id_santa> | PATCH |
delete santa | 0.0.0.0:8000 | /santa/delete/<id_santa> | DELETE |
get santa members | 0.0.0.0:8000 | /santa/<id_santa>/members | GET |
get santa member | 0.0.0.0:8000 | /santa/<id_santa>/member/<id_member> | GET |
add santa member | 0.0.0.0:8000 | /santa/<id_santa>/add | POST |
update santa member | 0.0.0.0:8000 | /santa/<id_santa>/update/<id_member> | PATCH |
delete santa member | 0.0.0.0:8000 | /santa/<id_santa>/delete/<id_member> | DELETE |