Fix issue with linking default user to org in single tenant + no-auth mode

This commit is contained in:
bkellam 2025-03-23 21:56:46 -07:00
parent d8fd958b0e
commit c89226871e

View file

@ -54,10 +54,19 @@ const initSingleTenancy = async () => {
},
data: {
members: {
create: {
role: OrgRole.MEMBER,
user: {
connect: { id: SINGLE_TENANT_USER_ID }
upsert: {
where: {
orgId_userId: {
orgId: SINGLE_TENANT_ORG_ID,
userId: SINGLE_TENANT_USER_ID,
}
},
update: {},
create: {
role: OrgRole.MEMBER,
user: {
connect: { id: SINGLE_TENANT_USER_ID }
}
}
}
}