From e587faae57dad6ece8d930d7c8c8b3410fe66c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Sun, 26 Nov 2023 06:33:34 +0100 Subject: [PATCH] Revert "fix POST /{username}/{reponame}/{type:issues|pulls}/{index}/content-history/soft-delete" This reverts commit 75730a6ded5c225a64c9a8a1f900d197eb47507b. --- routers/web/repo/issue_content_history.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/routers/web/repo/issue_content_history.go b/routers/web/repo/issue_content_history.go index 23255e774f..3dd7725c21 100644 --- a/routers/web/repo/issue_content_history.go +++ b/routers/web/repo/issue_content_history.go @@ -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 {