Archived
fix username assignment in comments for issue
This commit is contained in:
1 file changed
+2
-2
@@ -20,9 +20,9 @@ export class IssuesService {
|
|||||||
return this.repository.save(issue);
|
return this.repository.save(issue);
|
||||||
}
|
}
|
||||||
|
|
||||||
async addComment(id: string, { content }: CreateIssueCommentDto) {
|
async addComment(id: string, dto: CreateIssueCommentDto) {
|
||||||
const issue = await this.findOne(id);
|
const issue = await this.findOne(id);
|
||||||
const comment = this.comments.create({ content });
|
const comment = this.comments.create(dto);
|
||||||
comment.issue = Promise.resolve(issue);
|
comment.issue = Promise.resolve(issue);
|
||||||
return this.comments.save(comment);
|
return this.comments.save(comment);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user