Skip to content

Commit

Permalink
Update QuestionServices.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed May 17, 2024
1 parent 05f88dc commit e7d08c7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions MyApp.ServiceInterface/QuestionServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,21 @@ public async Task<object> Any(UpdateAnswer request)
}

await questions.SaveAnswerEditAsync(answerFile, userName, request.Body, request.EditReason);

var postId = request.Id.LeftPart('-').ToInt();
var post = await questions.GetQuestionFileAsPostAsync(postId);
if (post != null)
{
var user = request.Id.RightPart('-');
MessageProducer.Publish(new AiServerTasks
{
CreateAnswerTasks = new()
{
Post = post,
ModelUsers = [user],
}
});
}

return new UpdateAnswerResponse();
}
Expand Down

0 comments on commit e7d08c7

Please sign in to comment.