solve mail backend 13
This commit is contained in:
parent
9f8c28238b
commit
7b015f5961
@ -67,7 +67,10 @@ export async function GET() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return NextResponse.json(result);
|
return NextResponse.json({
|
||||||
|
emails: result,
|
||||||
|
folders: ['INBOX', 'Sent', 'Drafts', 'Trash', 'Spam']
|
||||||
|
});
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
await client.logout();
|
await client.logout();
|
||||||
|
|||||||
@ -584,7 +584,7 @@ export default function MailPage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Process emails keeping exact folder names
|
// Process emails keeping exact folder names
|
||||||
const processedEmails = data.emails.map((email: any) => ({
|
const processedEmails = (data.emails || []).map((email: any) => ({
|
||||||
id: Number(email.id),
|
id: Number(email.id),
|
||||||
accountId: 1,
|
accountId: 1,
|
||||||
from: email.from || '',
|
from: email.from || '',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user