refactor(quick-260921-m34): Aufgabe 2c - Hochladewege getypt, 25 Zusicherungen fallen mit
@UploadedFile()/@UploadedFiles() in cert-manager.controller auf UploadedFileLike. Der Dienst nimmt CertFileLike = Pick<UploadedFileLike, 'buffer' | 'originalname'> - genau die zwei Felder, die er liest; mimetype und size bleiben draussen, weil kein Zweig sie anfasst. Belegt statt behauptet: keiner der sechs FileInterceptor/FilesInterceptor- Aufrufe in apps/api/src setzt eine storage-Option, also gilt multers memoryStorage, also ist buffer ein Buffer. @types/multer bleibt uninstalliert (D-04). Damit fallen 25 Zusicherungen der Form file.buffer as Buffer und file.originalname as string ersatzlos weg - sie standen nur da, weil file ein any war. as unknown as bleibt bei 33, noNonNullAssertion bei 56. noExplicitAny in apps/api/src: 66 -> 56 (Ausgang der Aufgabe: 149, Schranke des Plans: 75). type-check 4/4, lint 5/5, apps/api 72/1143, apps/web 73/531. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TPPB4ApQxzSU1rwV2Ffj9J
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
} from '@nestjs/common';
|
||||
import { FileInterceptor, FilesInterceptor } from '@nestjs/platform-express';
|
||||
import { UseModule } from '../module-registry/module.guard';
|
||||
import type { UploadedFileLike } from '../auth/types/auth-user';
|
||||
import { CertManagerService } from './cert-manager.service';
|
||||
|
||||
/**
|
||||
@@ -39,7 +40,7 @@ export class CertManagerController {
|
||||
}),
|
||||
)
|
||||
async parseCert(
|
||||
@UploadedFile() file: any,
|
||||
@UploadedFile() file: UploadedFileLike | undefined,
|
||||
@Body('password') password?: string,
|
||||
@Body('pemText') pemText?: string,
|
||||
) {
|
||||
@@ -60,7 +61,7 @@ export class CertManagerController {
|
||||
}),
|
||||
)
|
||||
async splitCerts(
|
||||
@UploadedFile() file: any,
|
||||
@UploadedFile() file: UploadedFileLike | undefined,
|
||||
@Body('password') password?: string,
|
||||
) {
|
||||
if (!file) {
|
||||
@@ -81,7 +82,7 @@ export class CertManagerController {
|
||||
}),
|
||||
)
|
||||
async mergeCerts(
|
||||
@UploadedFiles() files: any[],
|
||||
@UploadedFiles() files: UploadedFileLike[],
|
||||
@Body('outputFormat') outputFormat: string,
|
||||
@Body('password') password?: string,
|
||||
) {
|
||||
@@ -107,7 +108,7 @@ export class CertManagerController {
|
||||
}),
|
||||
)
|
||||
async convertCert(
|
||||
@UploadedFile() file: any,
|
||||
@UploadedFile() file: UploadedFileLike | undefined,
|
||||
@Body('targetFormat') targetFormat: string,
|
||||
@Body('password') password?: string,
|
||||
@Body('pemText') pemText?: string,
|
||||
|
||||
Reference in New Issue
Block a user