feat: auto generate api types

This commit is contained in:
naiba
2024-11-09 00:07:21 +08:00
parent 680dc219d3
commit f842d5aeec
13 changed files with 1315 additions and 155 deletions
+3 -7
View File
@@ -1,12 +1,8 @@
import { User } from "@/types"
import { ModelUser } from "@/types"
import { fetcher, FetcherMethod } from "./api"
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 getProfile = async (): Promise<ModelUser> => {
return fetcher<ModelUser>(FetcherMethod.GET, '/api/v1/profile', null)
}
export const login = async (username: string, password: string): Promise<any> => {