Add logged user and user communities endpoint

This commit is contained in:
Aslan 2025-12-31 14:59:42 +01:00
parent df2b2a4247
commit f736171db8
3 changed files with 37 additions and 2 deletions

View file

@ -1,3 +1,3 @@
# Nexlink
Communication protocol spec and API documentation
Spec and API documentation for a gamified communication protocol with AI support

View file

@ -1 +1 @@
0.3.3
0.3.4

View file

@ -18,6 +18,20 @@ Returns a user with id = {id}
}
```
## GET /api/v1/user/logged
_Requires an authorization header_
Returns id of the currently logged user based on the auth token
### Response:
```json
{
"id": "string"
}
```
## POST /api/v1/user
_Requires an authorization header_
@ -106,3 +120,24 @@ Returns all sessions for a user with id = {id}
]
}
```
## GET /api/v1/user/{id}/communities
_Requires an authorization header_
Returns all communities for a user with id = {id}
### Response:
```json
{
"id": "string",
"communities": [
{
"id": "string",
"name": "string",
"description": "string"
}
]
}
```