10 lines
272 B
TypeScript
10 lines
272 B
TypeScript
|
|
import { LoginRequest, User } from "@/types"
|
||
|
|
import { WebClient } from "@/shared/web-client"
|
||
|
|
|
||
|
|
export async function login(loginRequest: LoginRequest): Promise<User> {
|
||
|
|
const { data } = await WebClient.post<User>("/auth/login", {
|
||
|
|
...loginRequest,
|
||
|
|
})
|
||
|
|
return data
|
||
|
|
}
|