feat: refresh token

This commit is contained in:
naiba committed 2024-11-05 00:02:43 +08:00
1 parent b1a0b607da
commit bfdae2838f
5 files changed
+35 -20

No files matched your search

+4
View File
@@ -5,6 +5,10 @@ export const getProfile = async (): Promise<User> => {
return fetcher<User>(FetcherMethod.GET, '/api/v1/profile', null)
}
export const refreshToken = async (): Promise<any> => {
return fetcher<any>(FetcherMethod.GET, '/api/v1/refresh_token', null)
}
export const login = async (username: string, password: string): Promise<any> => {
return fetcher<any>(FetcherMethod.POST, '/api/v1/login', { username, password })
}