mirror of https://gitee.com/answerdev/answer.git
Merge branch 'feat/0.5.0/timeline_ai' into test
This commit is contained in:
commit
7eb6f9a295
|
@ -159,6 +159,6 @@ func (rc *RevisionController) CheckCanUpdateRevision(ctx *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
err = rc.revisionListService.CheckCanUpdateRevision(ctx, req)
|
||||
handler.HandleResponse(ctx, err, nil)
|
||||
resp, err := rc.revisionListService.CheckCanUpdateRevision(ctx, req)
|
||||
handler.HandleResponse(ctx, err, resp)
|
||||
}
|
||||
|
|
|
@ -386,13 +386,14 @@ func (rs *RevisionService) parseItem(ctx context.Context, item *schema.GetRevisi
|
|||
}
|
||||
|
||||
// CheckCanUpdateRevision can check revision
|
||||
func (rs *RevisionService) CheckCanUpdateRevision(ctx context.Context, req *schema.CheckCanQuestionUpdate) (err error) {
|
||||
func (rs *RevisionService) CheckCanUpdateRevision(ctx context.Context, req *schema.CheckCanQuestionUpdate) (
|
||||
resp *schema.ErrTypeData, err error) {
|
||||
_, exist, err := rs.revisionRepo.ExistUnreviewedByObjectID(ctx, req.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
return nil, nil
|
||||
}
|
||||
if exist {
|
||||
return errors.BadRequest(reason.RevisionReviewUnderway)
|
||||
return &schema.ErrTypeToast, errors.BadRequest(reason.RevisionReviewUnderway)
|
||||
}
|
||||
return nil
|
||||
return nil, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue