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:
parent
b29b188912
commit
a5f54e165b
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user