mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-18 21:55:24 +02:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -292,4 +292,3 @@ describe("Environment Access Fallback", () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -290,9 +290,8 @@ export const ShowProjects = () => {
|
||||
|
||||
// Find default environment from accessible environments, or fall back to first accessible environment
|
||||
const accessibleEnvironment =
|
||||
project?.environments.find(
|
||||
(env) => env.isDefault,
|
||||
) || project?.environments?.[0];
|
||||
project?.environments.find((env) => env.isDefault) ||
|
||||
project?.environments?.[0];
|
||||
|
||||
return (
|
||||
<div
|
||||
|
||||
@@ -1628,9 +1628,10 @@ export async function getServerSideProps(
|
||||
});
|
||||
} catch (error) {
|
||||
// If user doesn't have access to requested environment, redirect to accessible one
|
||||
const accessibleEnvironments = await helpers.environment.byProjectId.fetch({
|
||||
projectId: params.projectId,
|
||||
});
|
||||
const accessibleEnvironments =
|
||||
await helpers.environment.byProjectId.fetch({
|
||||
projectId: params.projectId,
|
||||
});
|
||||
|
||||
if (accessibleEnvironments.length > 0) {
|
||||
// Try to find default, otherwise use first accessible
|
||||
|
||||
Reference in New Issue
Block a user