mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Bug on Auth.
This commit is contained in:
+10
-1
@@ -117,7 +117,16 @@ export const {handlers, auth: baseAuth, signIn, signOut} = NextAuth({
|
|||||||
|
|
||||||
const defaultOrganization = await prisma.organization.findUnique({
|
const defaultOrganization = await prisma.organization.findUnique({
|
||||||
where: {slug: "default"},
|
where: {slug: "default"},
|
||||||
include: {users: {}}
|
include: {users: {
|
||||||
|
include:{
|
||||||
|
user: true
|
||||||
|
},
|
||||||
|
where:{
|
||||||
|
user: {
|
||||||
|
deleted: {not: true},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
});
|
});
|
||||||
|
|
||||||
const organizationRole = defaultOrganization.users.length > 0 ? "member" : "admin"
|
const organizationRole = defaultOrganization.users.length > 0 ? "member" : "admin"
|
||||||
|
|||||||
Reference in New Issue
Block a user