aboutsummaryrefslogtreecommitdiff
path: root/internal/route/repo
diff options
context:
space:
mode:
Diffstat (limited to 'internal/route/repo')
-rw-r--r--internal/route/repo/issue.go18
-rw-r--r--internal/route/repo/release.go2
-rw-r--r--internal/route/repo/repo.go2
-rw-r--r--internal/route/repo/setting.go4
-rw-r--r--internal/route/repo/webhook.go2
-rw-r--r--internal/route/repo/webhook_test.go2
-rw-r--r--internal/route/repo/wiki.go2
7 files changed, 16 insertions, 16 deletions
diff --git a/internal/route/repo/issue.go b/internal/route/repo/issue.go
index f6a0d1b5..1fd4820e 100644
--- a/internal/route/repo/issue.go
+++ b/internal/route/repo/issue.go
@@ -719,7 +719,7 @@ func UpdateIssueTitle(c *context.Context) {
return
}
- c.JSONSuccess(map[string]interface{}{
+ c.JSONSuccess(map[string]any{
"title": issue.Title,
})
}
@@ -778,7 +778,7 @@ func UpdateIssueLabel(c *context.Context) {
}
}
- c.JSONSuccess(map[string]interface{}{
+ c.JSONSuccess(map[string]any{
"ok": true,
})
}
@@ -792,7 +792,7 @@ func UpdateIssueMilestone(c *context.Context) {
oldMilestoneID := issue.MilestoneID
milestoneID := c.QueryInt64("id")
if oldMilestoneID == milestoneID {
- c.JSONSuccess(map[string]interface{}{
+ c.JSONSuccess(map[string]any{
"ok": true,
})
return
@@ -805,7 +805,7 @@ func UpdateIssueMilestone(c *context.Context) {
return
}
- c.JSONSuccess(map[string]interface{}{
+ c.JSONSuccess(map[string]any{
"ok": true,
})
}
@@ -818,7 +818,7 @@ func UpdateIssueAssignee(c *context.Context) {
assigneeID := c.QueryInt64("id")
if issue.AssigneeID == assigneeID {
- c.JSONSuccess(map[string]interface{}{
+ c.JSONSuccess(map[string]any{
"ok": true,
})
return
@@ -829,7 +829,7 @@ func UpdateIssueAssignee(c *context.Context) {
return
}
- c.JSONSuccess(map[string]interface{}{
+ c.JSONSuccess(map[string]any{
"ok": true,
})
}
@@ -943,7 +943,7 @@ func UpdateCommentContent(c *context.Context) {
oldContent := comment.Content
comment.Content = c.Query("content")
if comment.Content == "" {
- c.JSONSuccess(map[string]interface{}{
+ c.JSONSuccess(map[string]any{
"content": "",
})
return
@@ -1062,7 +1062,7 @@ func DeleteLabel(c *context.Context) {
c.Flash.Success(c.Tr("repo.issues.label_deletion_success"))
}
- c.JSONSuccess(map[string]interface{}{
+ c.JSONSuccess(map[string]any{
"redirect": c.Repo.MakeURL("labels"),
})
}
@@ -1260,7 +1260,7 @@ func DeleteMilestone(c *context.Context) {
c.Flash.Success(c.Tr("repo.milestones.deletion_success"))
}
- c.JSONSuccess(map[string]interface{}{
+ c.JSONSuccess(map[string]any{
"redirect": c.Repo.MakeURL("milestones"),
})
}
diff --git a/internal/route/repo/release.go b/internal/route/repo/release.go
index f8a90f42..3aabcf02 100644
--- a/internal/route/repo/release.go
+++ b/internal/route/repo/release.go
@@ -320,7 +320,7 @@ func DeleteRelease(c *context.Context) {
c.Flash.Success(c.Tr("repo.release.deletion_success"))
}
- c.JSONSuccess(map[string]interface{}{
+ c.JSONSuccess(map[string]any{
"redirect": c.Repo.RepoLink + "/releases",
})
}
diff --git a/internal/route/repo/repo.go b/internal/route/repo/repo.go
index b9f9f988..f19bd3df 100644
--- a/internal/route/repo/repo.go
+++ b/internal/route/repo/repo.go
@@ -86,7 +86,7 @@ func Create(c *context.Context) {
c.Success(CREATE)
}
-func handleCreateError(c *context.Context, err error, name, tpl string, form interface{}) {
+func handleCreateError(c *context.Context, err error, name, tpl string, form any) {
switch {
case db.IsErrReachLimitOfRepo(err):
c.RenderWithErr(c.Tr("repo.form.reach_limit_of_creation", err.(db.ErrReachLimitOfRepo).Limit), tpl, form)
diff --git a/internal/route/repo/setting.go b/internal/route/repo/setting.go
index c02254ee..b1d4de6a 100644
--- a/internal/route/repo/setting.go
+++ b/internal/route/repo/setting.go
@@ -429,7 +429,7 @@ func DeleteCollaboration(c *context.Context) {
c.Flash.Success(c.Tr("repo.settings.remove_collaborator_success"))
}
- c.JSONSuccess(map[string]interface{}{
+ c.JSONSuccess(map[string]any{
"redirect": c.Repo.RepoLink + "/settings/collaboration",
})
}
@@ -682,7 +682,7 @@ func DeleteDeployKey(c *context.Context) {
c.Flash.Success(c.Tr("repo.settings.deploy_key_deletion_success"))
}
- c.JSONSuccess(map[string]interface{}{
+ c.JSONSuccess(map[string]any{
"redirect": c.Repo.RepoLink + "/settings/keys",
})
}
diff --git a/internal/route/repo/webhook.go b/internal/route/repo/webhook.go
index 615137bc..7b90a651 100644
--- a/internal/route/repo/webhook.go
+++ b/internal/route/repo/webhook.go
@@ -591,7 +591,7 @@ func DeleteWebhook(c *context.Context, orCtx *orgRepoContext) {
}
c.Flash.Success(c.Tr("repo.settings.webhook_deletion_success"))
- c.JSONSuccess(map[string]interface{}{
+ c.JSONSuccess(map[string]any{
"redirect": orCtx.Link + "/settings/hooks",
})
}
diff --git a/internal/route/repo/webhook_test.go b/internal/route/repo/webhook_test.go
index 784d66ed..3c25ba99 100644
--- a/internal/route/repo/webhook_test.go
+++ b/internal/route/repo/webhook_test.go
@@ -16,7 +16,7 @@ import (
func Test_validateWebhook(t *testing.T) {
l := &mocks.Locale{
MockLang: "en",
- MockTr: func(s string, _ ...interface{}) string {
+ MockTr: func(s string, _ ...any) string {
return s
},
}
diff --git a/internal/route/repo/wiki.go b/internal/route/repo/wiki.go
index 70c82626..4ddb92d6 100644
--- a/internal/route/repo/wiki.go
+++ b/internal/route/repo/wiki.go
@@ -263,7 +263,7 @@ func DeleteWikiPagePost(c *context.Context) {
return
}
- c.JSONSuccess(map[string]interface{}{
+ c.JSONSuccess(map[string]any{
"redirect": c.Repo.RepoLink + "/wiki/",
})
}