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.
This commit is contained in:
Mathis H (Avnyr) 2024-10-15 13:47:51 +02:00
parent b29b188912
commit a5f54e165b
Signed by: Mathis
GPG Key ID: DD9E0666A747D126

View File

@ -143,7 +143,7 @@ export class FilesController {
@UseGuards(AdminGuard) @UseGuards(AdminGuard)
@Post("types/new") @Post("types/new")
async newType(@Body() body: CreateFileTypeDto) { async newType(@Body() body: CreateFileTypeDto) {
//TODO return await this.filesService.createFileType(body.name, body.mime)
} }
@HttpCode(HttpStatus.ACCEPTED) @HttpCode(HttpStatus.ACCEPTED)