092_user_interface / src /services /auth.service.js
anotherath's picture
fix ui and core
4bae792
raw
history blame contribute delete
608 Bytes
import api from "./api";
export const authService = {
// Login
login: (credentials) => api.post("/auth/login", credentials),
// Register
register: (data) => api.post("/auth/register", data),
// Logout
logout: () => api.post("/auth/logout"),
// Refresh token
refreshToken: (refreshToken) => api.post("/auth/refresh", { refreshToken }),
// Get current user profile
getProfile: () => api.get("/auth/profile"),
// Update profile
updateProfile: (data) => api.patch("/auth/profile", data),
// Change password
changePassword: (data) => api.post("/auth/change-password", data),
};