版本审核

This commit is contained in:
aichy126 2022-11-25 10:46:39 +08:00
parent c08a9c852e
commit 3d532533cc
3 changed files with 8 additions and 0 deletions

View File

@ -95,6 +95,9 @@ backend:
theme:
not_found:
other: "Theme not found."
revision:
review_underway:
other: "Revision review underway."
user:
email_or_password_wrong:
other: *email_or_password_wrong

View File

@ -55,4 +55,5 @@ const (
UploadFileSourceUnsupported = "error.upload.source_unsupported"
RecommendTagNotExist = "error.tag.recommend_tag_not_found"
RecommendTagEnter = "error.tag.recommend_tag_enter"
RevisionReviewUnderway = "error.revision.review_underway"
)

View File

@ -840,5 +840,9 @@ func (qs *QuestionService) CheckCanUpdate(ctx context.Context, req *schema.Check
if err != nil {
return false, err
}
if existUnreviewed {
err = errors.BadRequest(reason.RevisionReviewUnderway)
return existUnreviewed, err
}
return existUnreviewed, nil
}