fix answer list

This commit is contained in:
aichy126 2022-11-24 11:50:11 +08:00
parent 2f33d000a1
commit fea5ff5fde
2 changed files with 8 additions and 1 deletions

View File

@ -194,7 +194,9 @@ func (ac *AnswerController) AnswerList(ctx *gin.Context) {
}
req.LoginUserID = middleware.GetLoginUserIDFromContext(ctx)
userinfo := middleware.GetUserInfoFromContext(ctx)
req.IsAdmin = userinfo.IsAdmin
if userinfo != nil {
req.IsAdmin = userinfo.IsAdmin
}
list, count, err := ac.answerService.SearchList(ctx, req)
if err != nil {
handler.HandleResponse(ctx, err, nil)

View File

@ -54,6 +54,11 @@ func (rs *RevisionService) RevisionAudit(ctx context.Context, req *schema.Revisi
err = rs.revisionRepo.UpdateStatus(ctx, req.ID, entity.RevisionReviewRejectStatus)
return
}
if req.Operation == schema.RevisionAuditApprove {
// revisioninfo.Status = entity.RevisionReviewRejectStatus
// err = rs.revisionRepo.UpdateStatus(ctx, req.ID, entity.RevisionReviewRejectStatus)
return
}
return nil
}