Skip to content

Commit 253cf94

Browse files
committed
feat(seed): demo file
1 parent 9979ed7 commit 253cf94

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

saintBarthVolleyApp/backend/src/controllers/authController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export const login = async (req, res) => {
102102
maxAge: 7 * 24 * 60 * 60 * 1000,
103103
});
104104

105-
res.status(200).json({ message: 'Connecté avec succès' });
105+
res.status(200).json({ message: 'Connecté avec succès', role: user.role });
106106
} catch (err) {
107107
console.error('LOGIN ERROR:', err);
108108
res.status(500).json({ message: 'Erreur serveur' });

saintBarthVolleyApp/frontend/src/lib/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface AuthUser {
1616

1717
export const authApi = {
1818
login: (email: string, password: string) =>
19-
apiFetch<AuthUser>("/api/auth/login", {
19+
apiFetch<{ message: string; role: AuthUser["role"] }>("/api/auth/login", {
2020
method: "POST",
2121
body: JSON.stringify({ email, password }),
2222
}),

0 commit comments

Comments
 (0)