test: update account Postman collection

This commit is contained in:
Leon
2025-12-09 16:37:27 +08:00
parent e0992d8fcd
commit d1c0f049d6

View File

@@ -10,15 +10,25 @@
"name": "Register Account", "name": "Register Account",
"request": { "request": {
"method": "POST", "method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }], "header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"username\": \"{{username}}\",\n \"password\": \"{{password}}\"\n}" "raw": "{\n \"username\": \"{{username}}\",\n \"password\": \"{{password}}\"\n}"
}, },
"url": { "url": {
"raw": "{{host}}/account/register", "raw": "{{host}}/account/register",
"host": ["{{host}}"], "host": [
"path": ["account", "register"] "{{host}}"
],
"path": [
"account",
"register"
]
} }
} }
}, },
@@ -26,15 +36,25 @@
"name": "Login", "name": "Login",
"request": { "request": {
"method": "POST", "method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }], "header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"username\": \"{{username}}\",\n \"password\": \"{{password}}\"\n}" "raw": "{\n \"username\": \"{{username}}\",\n \"password\": \"{{password}}\"\n}"
}, },
"url": { "url": {
"raw": "{{host}}/account/login", "raw": "{{host}}/account/login",
"host": ["{{host}}"], "host": [
"path": ["account", "login"] "{{host}}"
],
"path": [
"account",
"login"
]
} }
} }
}, },
@@ -42,15 +62,29 @@
"name": "Change Password", "name": "Change Password",
"request": { "request": {
"method": "POST", "method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }], "header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{jwt_token}}"
}
],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"username\": \"{{username}}\",\n \"old_password\": \"{{password}}\",\n \"new_password\": \"{{newPassword}}\"\n}" "raw": "{\n \"old_password\": \"{{password}}\",\n \"new_password\": \"{{newPassword}}\"\n}"
}, },
"url": { "url": {
"raw": "{{host}}/account/changePassword", "raw": "{{host}}/account/changePassword",
"host": ["{{host}}"], "host": [
"path": ["account", "changePassword"] "{{host}}"
],
"path": [
"account",
"changePassword"
]
} }
} }
}, },
@@ -58,15 +92,29 @@
"name": "Find Account By ID", "name": "Find Account By ID",
"request": { "request": {
"method": "POST", "method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }], "header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{jwt_token}}"
}
],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"id\": {{accountId}}\n}" "raw": "{\n \"id\": {{accountId}}\n}"
}, },
"url": { "url": {
"raw": "{{host}}/account/findByID", "raw": "{{host}}/account/findByID",
"host": ["{{host}}"], "host": [
"path": ["account", "findByID"] "{{host}}"
],
"path": [
"account",
"findByID"
]
} }
} }
}, },
@@ -74,15 +122,29 @@
"name": "Find Account By Username", "name": "Find Account By Username",
"request": { "request": {
"method": "POST", "method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }], "header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{jwt_token}}"
}
],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"username\": \"{{username}}\"\n}" "raw": "{\n \"username\": \"{{username}}\"\n}"
}, },
"url": { "url": {
"raw": "{{host}}/account/findByUsername", "raw": "{{host}}/account/findByUsername",
"host": ["{{host}}"], "host": [
"path": ["account", "findByUsername"] "{{host}}"
],
"path": [
"account",
"findByUsername"
]
} }
} }
}, },
@@ -91,17 +153,28 @@
"request": { "request": {
"method": "POST", "method": "POST",
"header": [ "header": [
{ "key": "Content-Type", "value": "application/json" }, {
{ "key": "Authorization", "value": "Bearer {{jwt_token}}" } "key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{jwt_token}}"
}
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"id\": {{accountId}},\n \"new_username\": \"{{newUsername}}\"\n}" "raw": "{\n \"new_username\": \"{{newUsername}}\"\n}"
}, },
"url": { "url": {
"raw": "{{host}}/account/rename", "raw": "{{host}}/account/rename",
"host": ["{{host}}"], "host": [
"path": ["account", "rename"] "{{host}}"
],
"path": [
"account",
"rename"
]
} }
} }
}, },
@@ -110,28 +183,60 @@
"request": { "request": {
"method": "POST", "method": "POST",
"header": [ "header": [
{ "key": "Content-Type", "value": "application/json" }, {
{ "key": "Authorization", "value": "Bearer {{jwt_token}}" } "key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{jwt_token}}"
}
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"id\": {{accountId}}\n}" "raw": "{}"
}, },
"url": { "url": {
"raw": "{{host}}/account/logout", "raw": "{{host}}/account/logout",
"host": ["{{host}}"], "host": [
"path": ["account", "logout"] "{{host}}"
],
"path": [
"account",
"logout"
]
} }
} }
} }
], ],
"variable": [ "variable": [
{ "key": "host", "value": "http://localhost:8080" }, {
{ "key": "username", "value": "alice" }, "key": "host",
{ "key": "password", "value": "pass123" }, "value": "http://localhost:8080"
{ "key": "newPassword", "value": "newpass456" }, },
{ "key": "newUsername", "value": "alice_new" }, {
{ "key": "accountId", "value": "1" }, "key": "username",
{ "key": "jwt_token", "value": "" } "value": "alice"
},
{
"key": "password",
"value": "pass123"
},
{
"key": "newPassword",
"value": "newpass456"
},
{
"key": "newUsername",
"value": "alice_new"
},
{
"key": "accountId",
"value": "1"
},
{
"key": "jwt_token",
"value": ""
}
] ]
} }