feat: 完善生产级 Rust Web 模板
This commit is contained in:
@@ -183,3 +183,17 @@ curl http://localhost:3000/health
|
||||
---
|
||||
|
||||
**提示**:建议使用 Postman、Insomnia 或类似工具测试 API 接口。
|
||||
# 新增通用接口
|
||||
|
||||
所有受保护接口使用 `Authorization: Bearer <access_token>`。Refresh Token 不能访问受保护接口。
|
||||
|
||||
| 方法 | 路径 | 认证 | 条件 |
|
||||
|---|---|---|---|
|
||||
| POST | `/auth/logout` | 是 | Redis 可用 |
|
||||
| POST | `/auth/request-verification-code` | 否 | 邮件启用且 Redis 可用 |
|
||||
| POST | `/auth/reset-password` | 否 | 邮件启用且 Redis 可用 |
|
||||
| GET/PUT/DELETE | `/api/user/profile` | 是 | 始终注册 |
|
||||
| GET | `/api/email/latest-log` | 是 | 邮件启用 |
|
||||
| GET | `/api/email/queue-status` | 是 | 邮件启用 |
|
||||
|
||||
请求可通过 `Accept-Language: zh-CN` 或 `Accept-Language: en` 选择认证错误语言。
|
||||
|
||||
Reference in New Issue
Block a user