refactor: update API routes and services to use environment context for organization authorization checks; enhance service retrieval methods to include environment details

This commit is contained in:
Mauricio Siu
2025-09-01 20:05:36 -06:00
parent 52d2bd2114
commit d57a0cf439
15 changed files with 262 additions and 114 deletions

View File

@@ -51,7 +51,11 @@ export const findPostgresById = async (postgresId: string) => {
const result = await db.query.postgres.findFirst({
where: eq(postgres.postgresId, postgresId),
with: {
project: true,
environment: {
with: {
project: true,
},
},
mounts: true,
server: true,
backups: {