mirror of
https://github.com/KeyZox71/knl_meowscendence.git
synced 2025-12-31 21:56:41 +01:00
Merge remote-tracking branch 'origin/main' into user-management
This commit is contained in:
@ -21,7 +21,8 @@ Input needed :
|
||||
```json
|
||||
{
|
||||
"user": "<string>",
|
||||
"password": "<string>"
|
||||
"password": "<string>",
|
||||
(optional)"token": "<2fa token>"
|
||||
}
|
||||
```
|
||||
|
||||
@ -32,7 +33,13 @@ Can return:
|
||||
"msg": "Login successfully"
|
||||
}
|
||||
```
|
||||
- 400 with response
|
||||
- 402 with response
|
||||
```json
|
||||
{
|
||||
"msg": "Please specify a 2fa token"
|
||||
}
|
||||
```
|
||||
- 400 || 401 with response
|
||||
```json
|
||||
{
|
||||
"error": "<corresponding error>"
|
||||
|
||||
32
doc/auth/remove.md
Normal file
32
doc/auth/remove.md
Normal file
@ -0,0 +1,32 @@
|
||||
# remove user
|
||||
|
||||
Available endpoints:
|
||||
- DELETE `/`
|
||||
|
||||
Common return:
|
||||
- 500 with response
|
||||
```json
|
||||
{
|
||||
"error": "Internal server error"
|
||||
}
|
||||
```
|
||||
|
||||
## DELETE `/`
|
||||
|
||||
User to remove a user from the backend
|
||||
|
||||
Inputs: just need a valid JWT cookie
|
||||
|
||||
Returns:
|
||||
- 200
|
||||
```json
|
||||
{
|
||||
"msg": "User successfully deleted"
|
||||
}
|
||||
```
|
||||
- 401 || 400
|
||||
```json
|
||||
{
|
||||
"error": "<corresponding msg>
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user