Skip to content

Commit 9da8104

Browse files
committed
docs: 适配接口测试文件
1 parent eba939a commit 9da8104

File tree

2 files changed

+48
-40
lines changed

2 files changed

+48
-40
lines changed

tests/passport.http

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Local Passport Api
2+
3+
### 注册账号
4+
5+
POST {{$dotenv TDP_API_BASE}}/passport/register
6+
Origin: {{$dotenv TDP_ORIGIN}}
7+
Content-Type: application/json
8+
9+
{
10+
"Username":"{{$dotenv TDP_USERNAME}}",
11+
"Password": "{{$dotenv TDP_PASSWORD}}"
12+
}
13+
14+
### 登录账号
15+
16+
POST {{$dotenv TDP_API_BASE}}/passport/login
17+
Origin: {{$dotenv TDP_ORIGIN}}
18+
Content-Type: application/json
19+
20+
{
21+
"Username":"{{$dotenv TDP_USERNAME}}",
22+
"Password": "{{$dotenv TDP_PASSWORD}}"
23+
}
24+
25+
### 修改资料
26+
27+
PATCH {{$dotenv TDP_API_BASE}}/passport/info
28+
Authorization: {{$dotenv TDP_AUTHORIZATION}}
29+
Origin: {{$dotenv TDP_ORIGIN}}
30+
Content-Type: application/json
31+
32+
{
33+
"Description": "不可能!我的代码怎么可能会有Bug!"
34+
}
35+
36+
### 修改密码
37+
38+
PATCH {{$dotenv TDP_API_BASE}}/passport/password
39+
Authorization: {{$dotenv TDP_AUTHORIZATION}}
40+
Origin: {{$dotenv TDP_ORIGIN}}
41+
Content-Type: application/json
42+
43+
{
44+
"OldPassword": "{{$dotenv TDP_PASSWORD}}",
45+
"NewPassword": "{{$dotenv TDP_PASSWORD}}"
46+
}

tests/user.http

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,8 @@
11
# Local User Api
22

3-
### 注册账号
3+
### 用户列表
44

5-
POST {{$dotenv TDP_API_BASE}}/user/register
6-
Origin: {{$dotenv TDP_ORIGIN}}
7-
Content-Type: application/json
8-
9-
{
10-
"Username":"{{$dotenv TDP_USERNAME}}",
11-
"Password": "{{$dotenv TDP_PASSWORD}}"
12-
}
13-
14-
### 登录账号
15-
16-
POST {{$dotenv TDP_API_BASE}}/user/login
17-
Origin: {{$dotenv TDP_ORIGIN}}
18-
Content-Type: application/json
19-
20-
{
21-
"Username":"{{$dotenv TDP_USERNAME}}",
22-
"Password": "{{$dotenv TDP_PASSWORD}}"
23-
}
24-
25-
### 修改资料
26-
27-
PATCH {{$dotenv TDP_API_BASE}}/user/info
28-
Authorization: {{$dotenv TDP_AUTHORIZATION}}
29-
Origin: {{$dotenv TDP_ORIGIN}}
30-
Content-Type: application/json
31-
32-
{
33-
"Description": "不可能!我的代码怎么可能会有Bug!"
34-
}
35-
36-
### 修改密码
37-
38-
PATCH {{$dotenv TDP_API_BASE}}/user/TDP_PASSWORD
5+
GET {{$dotenv TDP_API_BASE}}/user
396
Authorization: {{$dotenv TDP_AUTHORIZATION}}
407
Origin: {{$dotenv TDP_ORIGIN}}
418
Content-Type: application/json
42-
43-
{
44-
"OldPassword": "{{$dotenv TDP_PASSWORD}}",
45-
"NewPassword": "{{$dotenv TDP_PASSWORD}}"
46-
}

0 commit comments

Comments
 (0)