mirror of
1
Fork 0

Revert "fix POST /{username}/{reponame}/{type:issues|pulls}/{index}/content-history/soft-delete"

This reverts commit 75730a6ded.
This commit is contained in:
Loïc Dachary 2023-11-26 06:33:34 +01:00
parent d7f5ff0782
commit e587faae57
No known key found for this signature in database
GPG Key ID: 992D23B392F9E4F2
1 changed files with 0 additions and 8 deletions

View File

@ -194,19 +194,11 @@ func SoftDeleteContentHistory(ctx *context.Context) {
log.Error("can not get comment for issue content history %v. err=%v", historyID, err)
return
}
if comment.IssueID != issue.ID {
ctx.NotFound("CompareRepoID", issues_model.ErrCommentNotExist{})
return
}
}
if history, err = issues_model.GetIssueContentHistoryByID(ctx, historyID); err != nil {
log.Error("can not get issue content history %v. err=%v", historyID, err)
return
}
if history.IssueID != issue.ID {
ctx.NotFound("CompareRepoID", issues_model.ErrCommentNotExist{})
return
}
canSoftDelete := canSoftDeleteContentHistory(ctx, issue, comment, history)
if !canSoftDelete {