Initial commit with Email Import Wizard and Task Processor updates
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { Controller, Get, Post, Body, Param, UseGuards } from '@nestjs/common';
|
||||
import { KontonummernService } from './kontonummern.service';
|
||||
import { JwtOrApiKeyGuard } from '../auth/jwt-or-apikey.guard';
|
||||
|
||||
export class CreateKontonummerDto {
|
||||
correspondentId: number;
|
||||
nummer: string;
|
||||
}
|
||||
|
||||
@Controller('api/kontonummern')
|
||||
@UseGuards(JwtOrApiKeyGuard)
|
||||
export class KontonummernController {
|
||||
constructor(private readonly kontonummernService: KontonummernService) {}
|
||||
|
||||
@Get('FromCorrespondent/:id')
|
||||
async getByCorrespondent(@Param('id') id: string) {
|
||||
return this.kontonummernService.findByCorrespondent(parseInt(id, 10));
|
||||
}
|
||||
|
||||
@Post()
|
||||
async create(@Body() dto: CreateKontonummerDto) {
|
||||
return this.kontonummernService.create(dto.correspondentId, dto.nummer);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user