diff --git a/app/api/courrier/[id]/route.ts b/app/api/courrier/[id]/route.ts index aa638ec2..0d2707a3 100644 --- a/app/api/courrier/[id]/route.ts +++ b/app/api/courrier/[id]/route.ts @@ -35,6 +35,7 @@ export async function GET( const { searchParams } = new URL(request.url); const folder = searchParams.get("folder") || "INBOX"; + const accountId = searchParams.get("accountId"); try { // Try to get email from Redis cache first @@ -47,7 +48,7 @@ export async function GET( console.log(`Cache miss for email content ${session.user.id}:${id}, fetching from IMAP`); // Use the email service to fetch the email content - const email = await getEmailContent(session.user.id, id, folder); + const email = await getEmailContent(session.user.id, id, folder, accountId); // Return the complete email object return NextResponse.json(email); diff --git a/app/courrier/page.tsx b/app/courrier/page.tsx index 6dd07193..7926deb6 100644 --- a/app/courrier/page.tsx +++ b/app/courrier/page.tsx @@ -1013,6 +1013,31 @@ export default function CourrierPage() { >
{account.name} + {/* More options button (⋮) */} + {account.id !== 'loading-account' && ( + + + + + + { e.stopPropagation(); setAccountToEdit(account); setShowEditModal(true); }}> + Edit + + { e.stopPropagation(); setAccountToDelete(account); setShowDeleteDialog(true); }}> + Delete + + + + )} + {/* Expand/collapse arrow */} {account.id !== 'loading-account' && (