refactor: apply consistent formatting to improve code quality
Ensure uniform code formatting across components by aligning with the established code style. Adjust imports, indentation, and spacing to enhance readability and maintainability.
This commit is contained in:
@@ -1,22 +1,24 @@
|
||||
import api from "@/lib/api";
|
||||
import type { LoginResponse } from "@/types/auth";
|
||||
import type { LoginResponse, RegisterPayload } from "@/types/auth";
|
||||
|
||||
export const AuthService = {
|
||||
async login(email: string, password: string): Promise<LoginResponse> {
|
||||
const { data } = await api.post<LoginResponse>("/auth/login", { email, password });
|
||||
return data;
|
||||
},
|
||||
async login(email: string, password: string): Promise<LoginResponse> {
|
||||
const { data } = await api.post<LoginResponse>("/auth/login", {
|
||||
email,
|
||||
password,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
|
||||
async register(payload: any): Promise<any> {
|
||||
const { data } = await api.post("/auth/register", payload);
|
||||
return data;
|
||||
},
|
||||
async register(payload: RegisterPayload): Promise<void> {
|
||||
await api.post("/auth/register", payload);
|
||||
},
|
||||
|
||||
async logout(): Promise<void> {
|
||||
await api.post("/auth/logout");
|
||||
},
|
||||
async logout(): Promise<void> {
|
||||
await api.post("/auth/logout");
|
||||
},
|
||||
|
||||
async refresh(): Promise<void> {
|
||||
await api.post("/auth/refresh");
|
||||
},
|
||||
async refresh(): Promise<void> {
|
||||
await api.post("/auth/refresh");
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user