From fbc1140ccb5a6fb0568febd21da1c6f9bbb92fd7 Mon Sep 17 00:00:00 2001 From: alma Date: Mon, 21 Apr 2025 16:14:27 +0200 Subject: [PATCH] mail page rest dang --- app/courrier/page.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/courrier/page.tsx b/app/courrier/page.tsx index bab5b1ad..322450cf 100644 --- a/app/courrier/page.tsx +++ b/app/courrier/page.tsx @@ -545,7 +545,6 @@ export default function CourrierPage() { const handleEmailSelect = async (emailId: number) => { const email = emails.find(e => e.id === emailId); if (!email) { - console.error('Email not found in list'); return; } @@ -553,7 +552,7 @@ export default function CourrierPage() { setSelectedEmail(email); // Fetch the full email content - const response = await fetch(`/api/courrier/${emailId}`); + const response = await fetch(`/api/mail/${emailId}`); if (!response.ok) { throw new Error('Failed to fetch full email content'); } @@ -571,11 +570,10 @@ export default function CourrierPage() { // Try to mark as read in the background try { - const markReadResponse = await fetch(`/api/courrier/mark-read`, { + const markReadResponse = await fetch(`/api/mail/mark-read`, { method: 'POST', headers: { 'Content-Type': 'application/json', - 'Authorization': `Bearer ${session?.user?.id}` // Add session token }, body: JSON.stringify({ emailId,