fix username assignment in comments for issue

This commit is contained in:
mmacierzanka committed 2023-05-27 02:56:53 +02:00
1 parent 7dd7000885
commit 1d8532bff3
1 file changed
+2 -2
+2 -2
View File
@@ -20,9 +20,9 @@ export class IssuesService {
return this.repository.save(issue);
}
async addComment(id: string, { content }: CreateIssueCommentDto) {
async addComment(id: string, dto: CreateIssueCommentDto) {
const issue = await this.findOne(id);
const comment = this.comments.create({ content });
const comment = this.comments.create(dto);
comment.issue = Promise.resolve(issue);
return this.comments.save(comment);
}