mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 22:14:26 +00:00
fix: If user not found
This commit is contained in:
1 parent
c55505af6c
commit
a82805846f
1 file changed
+1
-1
+1
-1
@@ -80,7 +80,7 @@ export const getTeam = (event) => {
|
||||
|
||||
export const getUserDetails = async (event, isAdminRequired = true) => {
|
||||
const teamId = getTeam(event);
|
||||
const userId = event.locals.session.data.userId || null;
|
||||
const userId = event?.locals?.session?.data?.userId || null;
|
||||
const { permission = 'read' } = await db.prisma.permission.findFirst({
|
||||
where: { teamId, userId },
|
||||
select: { permission: true },
|
||||
|
||||
Reference in new issue
Block a user