Update Bruno API tests for user endpoints including new profile management

This commit is contained in:
2026-01-23 21:27:13 -05:00
parent 382a2369c5
commit 7c70e9e85a
12 changed files with 144 additions and 81 deletions
+5 -5
View File
@@ -1,7 +1,7 @@
meta {
name: Add Ebook Folder
type: http
seq: 5
seq: 8
}
post {
@@ -10,9 +10,9 @@ post {
auth: inherit
}
body {
body:json {
{
"folder_path": "/path/to/ebooks"
"folder_path": "/home/user/ebooks"
}
}
@@ -43,7 +43,7 @@ docs {
**Status Codes:**
- 201: Created
- 400: Bad Request
- 400: Invalid request
- 401: Unauthorized
- 409: Conflict (folder already exists)
- 409: Folder already exists
}
+14 -8
View File
@@ -1,15 +1,21 @@
meta {
name: Delete Ebook Folder
type: http
seq: 7
seq: 10
}
delete {
url: {{base_url}}/api/auth/ebook-folders/{{folder_path}}
body: none
url: {{base_url}}/api/auth/ebook-folders
body: json
auth: inherit
}
body:json {
{
"folder_path": "/home/user/ebooks"
}
}
settings {
encodeUrl: true
timeout: 0
@@ -22,19 +28,19 @@ docs {
**Method:** DELETE
**Endpoint:** /api/auth/ebook-folders/:folderPath
**Endpoint:** /api/auth/ebook-folders
**Authentication:** Required
**URL Parameters:**
- `folderPath` (string): URL-encoded folder path to remove
**Request Body:**
- `folder_path` (string, required): Path to the ebook folder to remove
**Response:**
- `message` (string): Success message
**Status Codes:**
- 200: Success
- 400: Bad Request
- 400: Invalid request
- 401: Unauthorized
- 404: Folder not found
- 500: Internal server error
}
+2 -2
View File
@@ -1,7 +1,7 @@
meta {
name: Get Ebook Folders
type: http
seq: 6
seq: 9
}
get {
@@ -18,7 +18,7 @@ settings {
docs {
## Get Ebook Folders
Retrieves all ebook folders for the authenticated user.
Retrieves the list of ebook folders for the authenticated user.
**Method:** GET
+2
View File
@@ -31,6 +31,8 @@ docs {
- `email` (string): Email
- `username` (string): Username
- `theme` (string): User theme preference
- `first_name` (string, optional): First name
- `last_name` (string, optional): Last name
**Status Codes:**
- 200: Success
+2 -2
View File
@@ -5,7 +5,7 @@ meta {
}
get {
url: {{base_url}}/api/users
url: {{base_url}}/api/auth/users
body: none
auth: inherit
}
@@ -22,7 +22,7 @@ docs {
**Method:** GET
**Endpoint:** /api/users
**Endpoint:** /api/auth/users
**Authentication:** Required
+2
View File
@@ -50,6 +50,8 @@ docs {
- `email` (string): Email
- `username` (string): Username
- `theme` (string): User theme preference
- `first_name` (string): First name
- `last_name` (string): Last name
**Status Codes:**
- 200: Success
+7 -1
View File
@@ -14,7 +14,9 @@ body:json {
{
"email": "test@example.com",
"username": "testuser",
"password": "password123"
"password": "password123",
"first_name": "Test",
"last_name": "User"
}
}
@@ -44,6 +46,8 @@ docs {
- `email` (string): Email address
- `username` (string): Username
- `password` (string): Password
- `first_name` (string, optional): First name
- `last_name` (string, optional): Last name
**Response:**
- `token` (string): JWT token
@@ -52,6 +56,8 @@ docs {
- `email` (string): Email
- `username` (string): Username
- `theme` (string): User theme preference
- `first_name` (string, optional): First name
- `last_name` (string, optional): Last name
**Status Codes:**
- 201: Created
+2 -2
View File
@@ -5,7 +5,7 @@ meta {
}
put {
url: {{base_url}}/api/user/email
url: {{base_url}}/api/auth/email
body: json
auth: inherit
}
@@ -28,7 +28,7 @@ docs {
**Method:** PUT
**Endpoint:** /api/user/email
**Endpoint:** /api/auth/email
**Authentication:** Required
+4 -4
View File
@@ -5,14 +5,14 @@ meta {
}
put {
url: {{base_url}}/api/user/password
url: {{base_url}}/api/auth/password
body: json
auth: inherit
}
body {
body:json {
{
"current_password": "currentpassword",
"current_password": "password123",
"new_password": "newpassword123",
"confirm_password": "newpassword123"
}
@@ -30,7 +30,7 @@ docs {
**Method:** PUT
**Endpoint:** /api/user/password
**Endpoint:** /api/auth/password
**Authentication:** Required
+47
View File
@@ -0,0 +1,47 @@
meta {
name: Update Profile
type: http
seq: 4
}
put {
url: {{base_url}}/api/auth/profile
body: json
auth: inherit
}
body:json {
{
"first_name": "Updated",
"last_name": "Name"
}
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Update User Profile
Updates the authenticated user's profile information.
**Method:** PUT
**Endpoint:** /api/auth/profile
**Authentication:** Required (Bearer token)
**Request Body:**
- `first_name` (string, optional): First name
- `last_name` (string, optional): Last name
**Response:**
- `message` (string): Success message
**Status Codes:**
- 200: Success
- 400: Invalid request
- 401: Unauthorized
}
+2 -2
View File
@@ -5,7 +5,7 @@ meta {
}
put {
url: {{base_url}}/api/user/username
url: {{base_url}}/api/auth/username
body: json
auth: inherit
}
@@ -28,7 +28,7 @@ docs {
**Method:** PUT
**Endpoint:** /api/user/username
**Endpoint:** /api/auth/username
**Authentication:** Required