feat(sys): add self-check functionality for system settings and frpc binary
This commit is contained in:
+39
@@ -20,6 +20,7 @@ All API responses are returned in JSON format:
|
||||
```
|
||||
|
||||
**Important Notes:**
|
||||
- All endpoints are relative to the base URL `/api`
|
||||
- For all requests: Authentication token and timestamp are sent in HTTP headers (prefixed with `X-`)
|
||||
- For **POST** requests: Other data is sent in the request body as JSON
|
||||
- For **GET** requests: All data is sent in HTTP headers (prefixed with `X-`)
|
||||
@@ -90,6 +91,44 @@ Get software version and build information.
|
||||
|
||||
---
|
||||
|
||||
## Self Check
|
||||
|
||||
**Endpoint:** `/system/selfCheck`
|
||||
**Method:** POST
|
||||
**Content-Type:** application/json
|
||||
**Permission Level:** Visitor
|
||||
|
||||
Check the system configuration and frpc binary.
|
||||
|
||||
**Request Headers:**
|
||||
```
|
||||
X-Token: your_token
|
||||
X-Timestamp: 1704067200000
|
||||
```
|
||||
| Header | Type | Required | Description |
|
||||
|--------|------|----------|-------------|
|
||||
| X-Token | string | Yes | Authentication token |
|
||||
| X-Timestamp | int64 | Yes | Client timestamp in milliseconds |
|
||||
|
||||
**Response (Success):**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"message": "Self check passed"
|
||||
}
|
||||
```
|
||||
> If there were any errors, the response will be in error format.
|
||||
|
||||
**Response (Error):**
|
||||
```json
|
||||
{
|
||||
"success": false,
|
||||
"message": "error message"
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Register User
|
||||
|
||||
**Endpoint:** `/register`
|
||||
|
||||
Reference in New Issue
Block a user