feat: process now button

This commit is contained in:
Leon
2025-07-16 18:20:21 +02:00
parent ad0d71cd2e
commit 0e19af170d
10 changed files with 238 additions and 28 deletions

View File

@@ -137,6 +137,18 @@ export async function testImapConnection(): Promise<{ message: string }> {
return response.json();
}
export async function processEmails(): Promise<{ message: string }> {
const response = await fetch(`${API_BASE_URL}/imap/process`, {
method: 'POST',
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.detail || "Failed to process emails");
}
return response.json();
}
export function getFeedUrl(newsletterId: number): string {
return `${API_BASE_URL}/feeds/${newsletterId}`;
}