- Add role-based restrictions to POST /api/auth/register endpoint - Only admins can create admin accounts if any admin already exists - First user automatically gets admin role regardless of request - Regular users can only create user accounts, not admin accounts - Unauthenticated users can only create first admin, not subsequent admins - Reorganize Bruno collection into logical subfolders (auth/, admin/, profile/) - Update documentation to reflect new registration restrictions and security rules BREAKING CHANGES: - /api/auth/register now enforces role-based creation restrictions - Bruno collection reorganized with subfolder structure
41 lines
725 B
Plaintext
41 lines
725 B
Plaintext
meta {
|
|
name: Update Theme
|
|
type: http
|
|
seq: 4
|
|
}
|
|
|
|
put {
|
|
url: {{base_url}}/api/auth/theme
|
|
body: json
|
|
auth: inherit
|
|
}
|
|
|
|
body:json {
|
|
{
|
|
"theme": "dracula"
|
|
}
|
|
}
|
|
|
|
docs {
|
|
## Update User Theme
|
|
|
|
Updates the authenticated user's theme preference.
|
|
|
|
**Method:** PUT
|
|
|
|
**Endpoint:** /api/auth/theme
|
|
|
|
**Authentication:** Required (Bearer token)
|
|
|
|
**Request Body:**
|
|
- `theme` (string): Theme name (tokyo-night, dracula, nord, solarized-dark, monokai, one-dark-pro, material-dark, catppuccin-mocha, catppuccin-macchiato, catppuccin-frappe, catppuccin-latte)
|
|
|
|
**Response:**
|
|
- `message` (string): Success message
|
|
|
|
**Status Codes:**
|
|
- 200: Success
|
|
- 400: Invalid theme
|
|
- 401: Unauthorized
|
|
}
|