add admin head.

This commit is contained in:
2023-03-13 19:42:29 +08:00
parent 89ba38ba0a
commit 341f0a0a2f
18 changed files with 197 additions and 18 deletions

View File

@@ -1,4 +1,5 @@
import http from "utils/http"
import { Profile } from "~/utils/types"
export function login(data: { username: string; password: string }) {
return http.post("login", data)
@@ -9,5 +10,5 @@ export function logout() {
}
export function getProfile(username: string = "") {
return http.get("profile", { params: { username } })
return http.get<Profile>("profile", { params: { username } })
}