solve mail backend 13

This commit is contained in:
alma 2025-04-17 14:37:52 +02:00
parent 9f8c28238b
commit 7b015f5961
2 changed files with 5 additions and 2 deletions

View File

@ -67,7 +67,10 @@ export async function GET() {
});
}
return NextResponse.json(result);
return NextResponse.json({
emails: result,
folders: ['INBOX', 'Sent', 'Drafts', 'Trash', 'Spam']
});
} finally {
try {
await client.logout();

View File

@ -584,7 +584,7 @@ export default function MailPage() {
}
// Process emails keeping exact folder names
const processedEmails = data.emails.map((email: any) => ({
const processedEmails = (data.emails || []).map((email: any) => ({
id: Number(email.id),
accountId: 1,
from: email.from || '',