Initial commit with Email Import Wizard and Task Processor updates

This commit is contained in:
2026-05-04 08:02:11 +02:00
commit effdc5d59f
170 changed files with 67739 additions and 0 deletions
@@ -0,0 +1,28 @@
import { Controller, Post, Logger, HttpCode, HttpStatus } from '@nestjs/common';
import { RequirePermissions } from '../auth/permissions.decorator';
import { Permission } from '../auth/permissions.enum';
import { EmailDownloadService } from './email-download.service';
@Controller('api/emails')
export class EmailDownloadController {
private readonly logger = new Logger(EmailDownloadController.name);
constructor(private readonly emailDownloadService: EmailDownloadService) {}
@Post('fetch')
@HttpCode(HttpStatus.OK)
async triggerFetch() {
this.logger.log('Manueller E-Mail-Abruf wurde ausgelöst.');
await this.emailDownloadService.handleCron();
return { message: 'E-Mail-Abruf abgeschlossen.' };
}
@Post('backfill-thumbnails')
@RequirePermissions(Permission.MANAGE_ALL)
@HttpCode(HttpStatus.OK)
async backfillThumbnails() {
this.logger.log('Manueller Backfill für Thumbnails wurde ausgelöst.');
const result = await this.emailDownloadService.backfillThumbnailsForNewEmails();
return { message: 'Backfill abgeschlossen.', result };
}
}