fix js error

This commit is contained in:
fantasticit 2022-11-19 23:38:00 +08:00
parent 2afa7b7a70
commit 8f1851bfea
1 changed files with 4 additions and 0 deletions

View File

@ -58,6 +58,10 @@ export class CommentService {
const doc = await this.documentService.findById(documentId);
if (!doc) {
throw new HttpException('文档不存在', HttpStatus.NOT_FOUND);
}
if (doc.status !== DocumentStatus.public) {
const authority = await this.documentService.getDocumentUserAuth(user.id, documentId);