import { User } from "../types/user"; import { apiHelpers } from "./api"; interface LoginPayload { email: string; password: string; } interface LoginResponse { token: string; user: User; } const authApi = { login: async (credentials: LoginPayload): Promise => { return apiHelpers.post("/auth/login", credentials); }, logout: async (): Promise => { return apiHelpers.post("/auth/logout"); }, me: async (): Promise => { return apiHelpers.get("/me"); }, }; export default authApi;