mirror of
https://github.com/docmost/docmost.git
synced 2025-11-23 22:51:19 +10:00
implement new invitation system
* fix comments on the frontend * move jwt token service to its own module * other fixes and updates
This commit is contained in:
@ -66,8 +66,7 @@ export class CommentService {
|
||||
workspaceId: workspaceId,
|
||||
});
|
||||
|
||||
// return created comment and creator relation
|
||||
return this.findById(createdComment.id);
|
||||
return createdComment;
|
||||
}
|
||||
|
||||
async findByPageId(
|
||||
@ -114,7 +113,12 @@ export class CommentService {
|
||||
return comment;
|
||||
}
|
||||
|
||||
async remove(id: string): Promise<void> {
|
||||
await this.commentRepo.deleteComment(id);
|
||||
async remove(commentId: string): Promise<void> {
|
||||
const comment = await this.commentRepo.findById(commentId);
|
||||
|
||||
if (!comment) {
|
||||
throw new NotFoundException('Comment not found');
|
||||
}
|
||||
await this.commentRepo.deleteComment(commentId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user