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,26 @@
import { Controller, Get, Post, Delete, Body, Param, UseGuards } from '@nestjs/common';
import { ApiKeysService } from './api-keys.service';
import { JwtAuthGuard } from './jwt-auth.guard';
@Controller('api/api-keys')
@UseGuards(JwtAuthGuard)
export class ApiKeysController {
constructor(private readonly apiKeysService: ApiKeysService) {}
@Post()
async create(@Body() body: { name: string; expiresDays?: number }) {
// Note: The plainKey is only returned here once.
return this.apiKeysService.createApiKey(body.name, body.expiresDays);
}
@Get()
async findAll() {
// Note: This returns hashed keys and prefixes, not the plain keys.
return this.apiKeysService.listKeys();
}
@Delete(':id')
async remove(@Param('id') id: string) {
return this.apiKeysService.deleteKey(id);
}
}