mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-04-29 04:00:09 +00:00
fix: patch help_improve bug (#1455)
Co-authored-by: Wendong-Fan <133094783+Wendong-Fan@users.noreply.github.com>
This commit is contained in:
parent
1d6a8550e0
commit
737bd1eaeb
5 changed files with 135 additions and 51 deletions
80
server/tests/user.http
Normal file
80
server/tests/user.http
Normal 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}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue