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

@@ -106,7 +106,11 @@ export const findApplicationById = async (applicationId: string) => {
const application = await db.query.applications.findFirst({
where: eq(applications.applicationId, applicationId),
with: {
environment: true,
environment: {
with: {
project: true,
},
},
domains: true,
deployments: true,
mounts: true,