import api from "@/lib/api"; import type { LoginResponse, RegisterPayload } from "@/types/auth"; export const AuthService = { async login(email: string, password: string): Promise { const { data } = await api.post("/auth/login", { email, password, }); return data; }, async register(payload: RegisterPayload): Promise { await api.post("/auth/register", payload); }, async logout(): Promise { await api.post("/auth/logout"); }, async refresh(): Promise { await api.post("/auth/refresh"); }, };