fix: patch help_improve bug (#1455)

Co-authored-by: Wendong-Fan <133094783+Wendong-Fan@users.noreply.github.com>
This commit is contained in:
Ahmed Awelkair A 2026-03-05 15:35:33 +00:00 committed by GitHub
parent 1d6a8550e0
commit 737bd1eaeb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 135 additions and 51 deletions

80
server/tests/user.http Normal file
View file

@ -0,0 +1,80 @@
### ============================================
### Eigent Server API Tests
### ============================================
### VSCode Extension: "REST Client" by Huachao Mao
### Extension ID: humao.rest-client
### ============================================
@baseUrl = http://localhost:3001/api
@token = YOUR_TOKEN_HERE
### ──────────────────────────────────────────
### Auth (no token required)
### ──────────────────────────────────────────
### Register a new user
POST {{baseUrl}}/register
Content-Type: application/json
{
"email": "test@example.com",
"password": "testpassword123"
}
### Login
# @name login
POST {{baseUrl}}/login
Content-Type: application/json
{
"email": "test@example.com",
"password": "testpassword123"
}
### Save token from login response (use this after running login)
@authToken = {{login.response.body.token}}
### ──────────────────────────────────────────
### User
### ──────────────────────────────────────────
### Get current user info
GET {{baseUrl}}/user
Authorization: Bearer {{authToken}}
### ──────────────────────────────────────────
### Privacy Settings
### ──────────────────────────────────────────
### Get privacy settings
GET {{baseUrl}}/user/privacy
Authorization: Bearer {{authToken}}
### Update privacy settings
PUT {{baseUrl}}/user/privacy
Authorization: Bearer {{authToken}}
Content-Type: application/json
{
"take_screenshot": true,
"access_local_software": false,
"access_your_address": false,
"password_storage": false
}
### Update only help_improve
PUT {{baseUrl}}/user/privacy
Authorization: Bearer {{authToken}}
Content-Type: application/json
{
"help_improve": true
}
### ──────────────────────────────────────────
### User Stats
### ──────────────────────────────────────────
### Get user stats
GET {{baseUrl}}/user/stat
Authorization: Bearer {{authToken}}