fix(final-docs): exclude dropped mentors from doc access; relative in-app reminder link
All checks were successful
Build and Push Docker Image / build (push) Successful in 7m43s

Review follow-ups: mentor.getProjectFinalDocuments now filters droppedAt:null
(a dropped mentor no longer sees a team's final docs); reminder linkUrl is
relative so the in-app notification does client-side nav (email still absolutized).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matt
2026-06-09 16:19:16 +02:00
parent f61dcfa89a
commit 696d7e9041
2 changed files with 2 additions and 6 deletions

View File

@@ -88,10 +88,6 @@ export async function getFinalDocumentStatusForProject(
}
}
function baseUrl(): string {
return (process.env.NEXTAUTH_URL ?? 'http://localhost:3000').replace(/\/$/, '')
}
/** Build the reminder notification payload for one finalist team lead. */
async function remindTeam(
prisma: PrismaClient,
@@ -104,7 +100,7 @@ async function remindTeam(
message: args.missing.length
? `Still needed for "${args.projectTitle}": ${args.missing.join(', ')}.`
: `Please upload the final documents for "${args.projectTitle}".`,
linkUrl: `${baseUrl()}/applicant/documents`,
linkUrl: `/applicant/documents`, // relative → client-side nav in-app; email renderer absolutizes
metadata: {
projectId: args.projectId,
projectTitle: args.projectTitle,