mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-09-20 02:00:14 +00:00
feat: login & check user
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { User } from "@/types"
|
||||
import { fetcher, FetcherMethod } from "./api"
|
||||
|
||||
export const getProfile = async (): Promise<User> => {
|
||||
return fetcher<User>(FetcherMethod.GET, '/api/v1/profile', null)
|
||||
}
|
||||
|
||||
export const login = async (username: string, password: string): Promise<any> => {
|
||||
return fetcher<any>(FetcherMethod.POST, '/api/v1/login', { username, password })
|
||||
}
|
||||
Reference in New Issue
Block a user