This commit is contained in:
Hamed
2026-07-30 10:57:49 +04:00
parent e03a4dfcb0
commit 31f261bf5f
102 changed files with 8782 additions and 1432 deletions
+31
View File
@@ -0,0 +1,31 @@
import apiClient from "./axios";
/**
* Auth service placeholder — wires up the shape the login/dashboard
* flow will eventually call. No real backend is connected yet.
*/
export const authService = {
/**
* @param {{ email: string, password: string }} credentials
* @returns {Promise<{ user: Object, token: string }>}
*/
async login(credentials) {
// TODO: Connect Login API
// return apiClient.post("/auth/login", credentials).then((res) => res.data);
return Promise.resolve({
user: { name: "کاربر مهمان", email: credentials?.email ?? "" },
token: "mock-token",
});
},
/**
* @returns {Promise<void>}
*/
async logout() {
// TODO: Connect Logout API
// return apiClient.post("/auth/logout");
return Promise.resolve();
},
};
export default authService;