Update Bruno requests: add Update Theme endpoint and include theme in responses
This commit is contained in:
@@ -30,6 +30,7 @@ docs {
|
||||
- `id` (string): User ID
|
||||
- `email` (string): Email
|
||||
- `username` (string): Username
|
||||
- `theme` (string): User theme preference
|
||||
|
||||
**Status Codes:**
|
||||
- 200: Success
|
||||
|
||||
@@ -46,6 +46,10 @@ docs {
|
||||
**Response:**
|
||||
- `token` (string): JWT token
|
||||
- `user` (object): User details
|
||||
- `id` (string): User ID
|
||||
- `email` (string): Email
|
||||
- `username` (string): Username
|
||||
- `theme` (string): User theme preference
|
||||
|
||||
**Status Codes:**
|
||||
- 200: Success
|
||||
|
||||
@@ -47,6 +47,10 @@ docs {
|
||||
**Response:**
|
||||
- `token` (string): JWT token
|
||||
- `user` (object): User details
|
||||
- `id` (string): User ID
|
||||
- `email` (string): Email
|
||||
- `username` (string): Username
|
||||
- `theme` (string): User theme preference
|
||||
|
||||
**Status Codes:**
|
||||
- 201: Created
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
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)
|
||||
|
||||
**Response:**
|
||||
- `message` (string): Success message
|
||||
|
||||
**Status Codes:**
|
||||
- 200: Success
|
||||
- 400: Invalid theme
|
||||
- 401: Unauthorized
|
||||
}
|
||||
Reference in New Issue
Block a user