docs: improve some READMEs
This commit is contained in:
parent
6f69695758
commit
a4a750b35c
3 changed files with 49 additions and 2 deletions
|
@ -8,8 +8,7 @@ Log into the service.
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
email?: string; // either email or username must be specified
|
username: string;
|
||||||
username?: string;
|
|
||||||
password_hash: string; //should be a base64-encoded SHA-256 hash of the user's client-entered pw
|
password_hash: string; //should be a base64-encoded SHA-256 hash of the user's client-entered pw
|
||||||
totp?: string; // TOTP if configured on account
|
totp?: string; // TOTP if configured on account
|
||||||
}
|
}
|
||||||
|
|
21
public/api/users/:id/README.md
Normal file
21
public/api/users/:id/README.md
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# /api/users/:id
|
||||||
|
|
||||||
|
Interact with a specific user.
|
||||||
|
|
||||||
|
## GET /api/users/:id
|
||||||
|
|
||||||
|
Get the user specified by `:id`. (user match/admin)
|
||||||
|
|
||||||
|
## PUT /api/users/:id
|
||||||
|
|
||||||
|
Update the user specified by `:id`. (user match/admin)
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
username?: string; // update username
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## DELETE /api/users/:id
|
||||||
|
|
||||||
|
Delete the user specified by `:id`. (user match/admin)
|
27
public/api/users/README.md
Normal file
27
public/api/users/README.md
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# /api/users
|
||||||
|
|
||||||
|
Interact with users.
|
||||||
|
|
||||||
|
## POST /api/users
|
||||||
|
|
||||||
|
Create a new user.
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
// set the user's username
|
||||||
|
username: string;
|
||||||
|
|
||||||
|
// set the user's password, will be hashed and discarded server-side
|
||||||
|
password?: string;
|
||||||
|
|
||||||
|
// can send an already-hashed password if we want to keep this client-side
|
||||||
|
// should be a base64-encoded SHA-256 hash of the user's client-entered pw
|
||||||
|
password_hash?: string;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## GET /api/users
|
||||||
|
|
||||||
|
Get users. (admin)
|
||||||
|
|
||||||
|
TODO: document this
|
Loading…
Add table
Add a link
Reference in a new issue