fix type
This commit is contained in:
parent
1855e1e965
commit
b8f6c17cf0
1 changed files with 3 additions and 3 deletions
|
|
@ -1,12 +1,12 @@
|
|||
import api from "@/lib/api-client";
|
||||
import { ILogin, IRegister, ITokenResponse, ITokens } from "@/features/auth/types/auth.types";
|
||||
import { ILogin, IRegister, ITokenResponse } from "@/features/auth/types/auth.types";
|
||||
|
||||
export async function login(data: ILogin): Promise<ITokenResponse>{
|
||||
const req = await api.post<ITokens>("/auth/login", data);
|
||||
const req = await api.post<ITokenResponse>("/auth/login", data);
|
||||
return req.data as ITokenResponse;
|
||||
}
|
||||
|
||||
export async function register(data: IRegister): Promise<ITokenResponse>{
|
||||
const req = await api.post<ITokens>("/auth/register", data);
|
||||
const req = await api.post<ITokenResponse>("/auth/register", data);
|
||||
return req.data as ITokenResponse;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue