mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 16:03:21 +00:00
feat: Gestion multi-profil multi-école
This commit is contained in:
@ -30,6 +30,7 @@ export const login = (data) => {
|
||||
redirect: false,
|
||||
email: data.email,
|
||||
password: data.password,
|
||||
role_type: data.role_type,
|
||||
})
|
||||
};
|
||||
|
||||
@ -194,7 +195,11 @@ export const getUser = async () => {
|
||||
return {
|
||||
id: session.user.user_id,
|
||||
email: session.user.email,
|
||||
role: session.user.droit
|
||||
roles: session.user.roles.map(role => ({
|
||||
role_type: role.role_type,
|
||||
establishment_id: role.establishment__id,
|
||||
establishment_name: role.establishment__name
|
||||
}))
|
||||
};
|
||||
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user