This is a Python API using Flask Framework that Connects the application to a Postgres database server. ORM like SQLAlchemy was used
#[POST] /auth/register Registers a users and creates a default organisation Register request body:
{
"firstName": "string",
"lastName": "string",
"email": "string",
"password": "string",
"phone": "string",
}- [POST] /auth/login : logs in a user. When you log in, you can select an organisation to interact with
{
"email": "string",
"password": "string",
}- [GET] /api/organisations: a user gets their own record or user record in organisations they belong to or created [PROTECTED]
- [GET] /api/organisations/:orgId the logged in user gets a single organisation record [PROTECTED]
- [POST] /api/organisations : a user can create their new organisation [PROTECTED]
{
"name": "string", // Required and cannot be null
"description": "string",
}- [POST] /api/organisations/:orgId/users : adds a user to a particular organisation
{
"userId": "string"
}- Flask
- 3.11.9
- tests/auth.spec.py