Working on role in workspace.

This commit is contained in:
charles-gauthereau
2024-12-31 10:54:18 +01:00
parent e1a7ca8558
commit 6f75079a40
29 changed files with 464 additions and 124 deletions
@@ -32,10 +32,13 @@ export const registerUserAction = action
where: {slug: "default"},
});
const organizationRole = users.length > 0 ? "member" : "admin"
await prisma.userOrganization.create({
data: {
userId: newUser.id,
organizationId: defaultOrganization.id
organizationId: defaultOrganization.id,
role:organizationRole
},
});