mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-16 04:35:24 +02:00
fix(auth): update admin check to safely access user property
- Modified the admin check to use optional chaining, ensuring that the user property is accessed only if it exists, preventing potential runtime errors.
This commit is contained in:
@@ -42,7 +42,7 @@ const { handler, api } = betterAuth({
|
||||
},
|
||||
});
|
||||
|
||||
if (admin) {
|
||||
if (admin?.user) {
|
||||
return [
|
||||
...(admin.user.serverIp
|
||||
? [`http://${admin.user.serverIp}:3000`]
|
||||
|
||||
Reference in New Issue
Block a user