Files
paperlessmanager/paperless-backend/src/kontonummern/kontonummern.controller.ts
T
bjoernpoettker dad0136365
Build and Push Multi-Platform Images / build-and-push (push) Successful in 41s
chore: apply ESLint auto-fix across entire backend
Reformats code style (line breaks, indentation, type annotations)
without changing logic. Also includes minor feature additions bundled
in the same lint run (stats service, user-settings groups, agrarmonitor
polling improvements).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 09:02:02 +02:00

25 lines
778 B
TypeScript

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);
}
}