summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2021-11-08 08:04:13 +0100
committerGitHub <noreply@github.com>2021-11-08 09:04:13 +0200
commitebaf4c48ea278955c5d79c5f37a2039ccb3cf775 (patch)
tree574893d946aaaf14a752d7e6a37408e4a0f85a9d /models
parent513951bc16f31c4a2821319baea846735f341a0e (diff)
downloadgitea-ebaf4c48ea278955c5d79c5f37a2039ccb3cf775.tar.gz
gitea-ebaf4c48ea278955c5d79c5f37a2039ccb3cf775.zip
Avoid double imports (#17569)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'models')
-rw-r--r--models/issue.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/models/issue.go b/models/issue.go
index a27bb1cc7d..0bc1ebd209 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -18,7 +18,6 @@ import (
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/references"
- "code.gitea.io/gitea/modules/structs"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/timeutil"
"code.gitea.io/gitea/modules/util"
@@ -2116,7 +2115,7 @@ func (issue *Issue) ResolveMentionsByVisibility(ctx context.Context, doer *User,
}
// UpdateIssuesMigrationsByType updates all migrated repositories' issues from gitServiceType to replace originalAuthorID to posterID
-func UpdateIssuesMigrationsByType(gitServiceType structs.GitServiceType, originalAuthorID string, posterID int64) error {
+func UpdateIssuesMigrationsByType(gitServiceType api.GitServiceType, originalAuthorID string, posterID int64) error {
_, err := db.GetEngine(db.DefaultContext).Table("issue").
Where("repo_id IN (SELECT id FROM repository WHERE original_service_type = ?)", gitServiceType).
And("original_author_id = ?", originalAuthorID).
@@ -2129,7 +2128,7 @@ func UpdateIssuesMigrationsByType(gitServiceType structs.GitServiceType, origina
}
// UpdateReactionsMigrationsByType updates all migrated repositories' reactions from gitServiceType to replace originalAuthorID to posterID
-func UpdateReactionsMigrationsByType(gitServiceType structs.GitServiceType, originalAuthorID string, userID int64) error {
+func UpdateReactionsMigrationsByType(gitServiceType api.GitServiceType, originalAuthorID string, userID int64) error {
_, err := db.GetEngine(db.DefaultContext).Table("reaction").
Where("original_author_id = ?", originalAuthorID).
And(migratedIssueCond(gitServiceType)).