feat(v2.7): 增加通知与评论协作模块

This commit is contained in:
2026-07-08 16:13:33 +08:00
parent ad36ffda17
commit 95523cd4a1
13 changed files with 586 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
import { Body, Controller, Delete, Get, Param, Post, Query } from '@nestjs/common';
import { CommentService, type CommentEntityType } from './comment.service';
import { CreateCommentDto } from './dto/create-comment.dto';
import { DeleteCommentDto } from './dto/delete-comment.dto';
@Controller('comments')
export class CommentController {
constructor(private readonly commentService: CommentService) {}
@Get()
list(@Query('entityType') entityType: CommentEntityType, @Query('entityId') entityId: string) {
return this.commentService.list(entityType, entityId);
}
@Post()
create(@Body() dto: CreateCommentDto) {
return this.commentService.create(dto);
}
@Delete(':id')
remove(@Param('id') id: string, @Body() dto: DeleteCommentDto) {
return this.commentService.remove(id, dto.actorId);
}
}