first commit.
This commit is contained in:
15
src/shared/api.ts
Normal file
15
src/shared/api.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import http from "../utils/http";
|
||||
|
||||
export function login(data: { username: string; password: string }) {
|
||||
return http.post("login", data);
|
||||
}
|
||||
|
||||
export function logout() {
|
||||
return http.get("logout");
|
||||
}
|
||||
|
||||
export function getUserInfo(username: string) {
|
||||
return http.get("profile", {
|
||||
params: { username },
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user