Add invitations and joining

This commit is contained in:
Aslan 2025-12-24 05:18:01 -05:00
parent 66b25d5135
commit d1685fde77
4 changed files with 131 additions and 2 deletions

View file

@ -12,6 +12,46 @@ Returns a community with id = {id}
}
```
## UPDATE /api/v1/community/{id}/name
*Requires an authentication header*
### Request:
```json
{
"name": "string"
}
```
Updates name for a community with id = {id}
### Response:
```json
{
"id": "string",
"name": "string",
}
```
## PATCH /api/v1/community/{id}/description
*Requires an authentication header*
### Request:
```json
{
"description": "string"
}
```
Updates description for a community with id = {id}
### Response:
```json
{
"id": "string",
"description": "string",
}
```
## GET /api/v1/community/{id}/members
*Requires an authentication header*
@ -68,3 +108,48 @@ Returns roles for a community with id = {id}
]
}
```
## POST /api/v1/community/{id}/invite
*Requires an authentication header*
### Request:
```json
{
"userId": "string"
}
```
Creates an invite to a community with id = {id}
### Response:
```json
{
"userId": "string",
"userName": "string",
"communityId": "string",
"communityName": "string",
}
```
## POST /api/v1/community/{id}/join
*Requires an authentication header*
### Request:
```json
{
"userId": "string"
}
```
Joins a user to a community with id = {id}
### Response:
```json
{
"userId": "string",
"userName": "string",
"communityId": "string",
"communityName": "string",
}
```