fix update answer edit time

This commit is contained in:
aichy126 2022-12-01 18:50:45 +08:00
parent a27b0013d5
commit 46d80f3956
2 changed files with 2 additions and 2 deletions

View File

@ -249,7 +249,7 @@ func (as *AnswerService) Update(ctx context.Context, req *schema.AnswerUpdateReq
if !canUpdate {
revisionDTO.Status = entity.RevisionUnreviewedStatus
} else {
if err = as.answerRepo.UpdateAnswer(ctx, insertData, []string{"original_text", "parsed_text", "update_time", "last_edit_user_id"}); err != nil {
if err = as.answerRepo.UpdateAnswer(ctx, insertData, []string{"original_text", "parsed_text", "updated_at", "last_edit_user_id"}); err != nil {
return "", err
}
err = as.questionCommon.UpdataPostTime(ctx, req.QuestionID)

View File

@ -167,7 +167,7 @@ func (rs *RevisionService) revisionAuditAnswer(ctx context.Context, revisionitem
insertData.ParsedText = answerinfo.HTML
insertData.UpdatedAt = now
insertData.LastEditUserID = revisionitem.UserID
saveerr := rs.answerRepo.UpdateAnswer(ctx, insertData, []string{"original_text", "parsed_text", "update_time", "last_edit_user_id"})
saveerr := rs.answerRepo.UpdateAnswer(ctx, insertData, []string{"original_text", "parsed_text", "updated_at", "last_edit_user_id"})
if saveerr != nil {
return saveerr
}