初始化v1

This commit is contained in:
2025-08-03 00:11:15 +08:00
commit b88c8b8afa
171 changed files with 22353 additions and 0 deletions

41
test_api.http Normal file
View File

@@ -0,0 +1,41 @@
### 用户注册
POST http://localhost:8000/api/v1/auth/register
Content-Type: application/json
{
"username": "testuser",
"phone": "13800138000",
"password": "123456",
"code": "123456"
}
### 用户登录
POST http://localhost:8000/api/v1/auth/login
Content-Type: application/json
{
"username": "testuser",
"password": "123456"
}
### 获取用户信息 (需要先登录获取token)
GET http://localhost:8000/api/v1/auth/profile
Authorization: Bearer YOUR_TOKEN_HERE
### 更新用户信息
PUT http://localhost:8000/api/v1/auth/profile
Authorization: Bearer YOUR_TOKEN_HERE
Content-Type: application/json
{
"nickname": "测试用户",
"gender": 1
}
### 刷新Token
POST http://localhost:8000/api/v1/auth/refresh
Authorization: Bearer YOUR_TOKEN_HERE
### 用户登出
POST http://localhost:8000/api/v1/auth/logout
Authorization: Bearer YOUR_TOKEN_HERE