Add role assign/unassign

This commit is contained in:
Aslan 2025-12-28 13:34:40 +01:00
parent c37a81e8fd
commit 91e22ed95d
2 changed files with 51 additions and 0 deletions

1
VERSION Normal file
View file

@ -0,0 +1 @@
0.3.1

View file

@ -40,3 +40,53 @@ Creates a new role and returns it
"communityId": "string"
}
```
## POST /api/v1/role/{id}/assign
_Requires an authorization header_
### Request:
```json
{
"userId": "string"
}
```
Assigns a role to a user
### Response:
```json
{
"id": "string",
"name": "string",
"communityId": "string",
"userId": "string"
}
```
## POST /api/v1/role/{id}/unassign
_Requires an authorization header_
### Request:
```json
{
"userId": "string"
}
```
Unassigns a role from a user
### Response:
```json
{
"id": "string",
"name": "string",
"communityId": "string",
"userId": "string"
}
```