add create a problem.

This commit is contained in:
2023-03-27 18:21:29 +08:00
parent 7f8260d34d
commit 9bc1a1b5b5
12 changed files with 831 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
import http from "utils/http"
import { Profile } from "~/utils/types"
import { Profile, Tag } from "~/utils/types"
export function login(data: { username: string; password: string }) {
return http.post("login", data)
@@ -12,3 +12,7 @@ export function logout() {
export function getProfile(username: string = "") {
return http.get<Profile>("profile", { params: { username } })
}
export function getProblemTagList() {
return http.get<Tag[]>("problem/tags")
}