|
@@ -20,7 +20,7 @@ export class RoomManagerController {
|
|
private readonly roomManagerService: RoomManagerService,
|
|
private readonly roomManagerService: RoomManagerService,
|
|
private readonly roomService: RoomService,
|
|
private readonly roomService: RoomService,
|
|
private readonly usersService: UsersService,
|
|
private readonly usersService: UsersService,
|
|
- ) {}
|
|
|
|
|
|
+ ) { }
|
|
|
|
|
|
@Get('/danmaku/:id')
|
|
@Get('/danmaku/:id')
|
|
@ApiOperation({ summary: '获取房间弹幕列表' })
|
|
@ApiOperation({ summary: '获取房间弹幕列表' })
|
|
@@ -36,8 +36,27 @@ export class RoomManagerController {
|
|
type: DanmakuDto,
|
|
type: DanmakuDto,
|
|
})
|
|
})
|
|
findDanmakuList(@Param('id') id: string) {
|
|
findDanmakuList(@Param('id') id: string) {
|
|
|
|
+ this.roomService.logger.log(`roomId: ${id}`, 'api-room-danmaku');
|
|
return this.roomManagerService.findDanmakuList(id);
|
|
return this.roomManagerService.findDanmakuList(id);
|
|
}
|
|
}
|
|
|
|
+ @Get('/danmaku/delete/:id')
|
|
|
|
+ @ApiOperation({ summary: '删除房间弹幕列表' })
|
|
|
|
+ @ApiParam({
|
|
|
|
+ name: 'id',
|
|
|
|
+ required: true,
|
|
|
|
+ description: '房间ID',
|
|
|
|
+ schema: { oneOf: [{ type: 'string' }] },
|
|
|
|
+ type: 'string',
|
|
|
|
+ })
|
|
|
|
+ @ApiResponse({
|
|
|
|
+ description: 'The record has been successfully created.',
|
|
|
|
+ type: DanmakuDto,
|
|
|
|
+ })
|
|
|
|
+ async deleteDanmakuList(@Param('id') id: string) {
|
|
|
|
+ this.roomService.logger.log(`roomId: ${id}`, 'api-room-del-danmaku');
|
|
|
|
+ const res = await this.usersService.delRoomMsgs(id);
|
|
|
|
+ return res;
|
|
|
|
+ }
|
|
|
|
|
|
@Get('/dismissRoom/:id')
|
|
@Get('/dismissRoom/:id')
|
|
@ApiOperation({ summary: '主动解散房间' })
|
|
@ApiOperation({ summary: '主动解散房间' })
|