From a5f54e165b398c64789209b13b69cf65c1e9bf29 Mon Sep 17 00:00:00 2001 From: Mathis Date: Tue, 15 Oct 2024 13:47:51 +0200 Subject: [PATCH] Implement file type creation endpoint Completed the `newType` method in `files.controller.ts` to call `filesService.createFileType` with the provided name and mime type. This enables the creation of new file types through the backend API. --- apps/backend/src/app/files/files.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/backend/src/app/files/files.controller.ts b/apps/backend/src/app/files/files.controller.ts index 5d585ae..f1c0c39 100644 --- a/apps/backend/src/app/files/files.controller.ts +++ b/apps/backend/src/app/files/files.controller.ts @@ -143,7 +143,7 @@ export class FilesController { @UseGuards(AdminGuard) @Post("types/new") async newType(@Body() body: CreateFileTypeDto) { - //TODO + return await this.filesService.createFileType(body.name, body.mime) } @HttpCode(HttpStatus.ACCEPTED)