This commit is contained in:
2023-04-04 11:46:28 +08:00
parent ae621b7dd2
commit 2066cb441b
18 changed files with 210 additions and 105 deletions

View File

@@ -5,6 +5,15 @@ export function login(data: { username: string; password: string }) {
return http.post("login", data)
}
export function signup(data: {
username: string
email: string
password: string
captcha: string
}) {
return http.post("register", data)
}
export function logout() {
return http.get("logout")
}
@@ -16,3 +25,7 @@ export function getProfile(username: string = "") {
export function getProblemTagList() {
return http.get<Tag[]>("problem/tags")
}
export function getCaptcha() {
return http.get("captcha")
}