|
@@ -9,6 +9,7 @@ import {
|
|
|
Post,
|
|
Post,
|
|
|
Req,
|
|
Req,
|
|
|
BadRequestException,
|
|
BadRequestException,
|
|
|
|
|
+ Delete,
|
|
|
} from '@nestjs/common';
|
|
} from '@nestjs/common';
|
|
|
import type { FastifyRequest } from 'fastify';
|
|
import type { FastifyRequest } from 'fastify';
|
|
|
import {
|
|
import {
|
|
@@ -250,4 +251,32 @@ export class VideoMediaController {
|
|
|
}
|
|
}
|
|
|
return this.videoMediaService.updateCover(id, mpFile);
|
|
return this.videoMediaService.updateCover(id, mpFile);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // TODO: 删除视频媒体
|
|
|
|
|
+ @ApiOperation({
|
|
|
|
|
+ summary: '删除视频媒体',
|
|
|
|
|
+ description: '根据 ID 删除指定的视频媒体',
|
|
|
|
|
+ })
|
|
|
|
|
+ @ApiParam({
|
|
|
|
|
+ name: 'id',
|
|
|
|
|
+ type: String,
|
|
|
|
|
+ description: '视频媒体 MongoDB ID',
|
|
|
|
|
+ example: '507f1f77bcf86cd799439011',
|
|
|
|
|
+ })
|
|
|
|
|
+ @ApiOkResponse({
|
|
|
|
|
+ description: '删除成功',
|
|
|
|
|
+ schema: {
|
|
|
|
|
+ type: 'object',
|
|
|
|
|
+ properties: {
|
|
|
|
|
+ id: { type: 'string', example: '507f1f77bcf86cd799439011' },
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ })
|
|
|
|
|
+ @ApiNotFoundResponse({
|
|
|
|
|
+ description: '视频媒体不存在',
|
|
|
|
|
+ })
|
|
|
|
|
+ @Delete(':id')
|
|
|
|
|
+ async delete(@Param('id') id: string) {
|
|
|
|
|
+ return this.videoMediaService.delete(id);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|