aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api
diff options
context:
space:
mode:
authorOleksandr Redko <oleksandr.red+github@gmail.com>2024-10-30 21:36:24 +0200
committerGitHub <noreply@github.com>2024-10-30 19:36:24 +0000
commitf4d3aaeeb9e1b11c5495e4608a3f52f316c35758 (patch)
treee2601e11bc483e16e07afeaa0c31ad55021fe0d8 /routers/api
parentdd1f67491f5e2f798a537a61c082b1bf12e47635 (diff)
downloadgitea-f4d3aaeeb9e1b11c5495e4608a3f52f316c35758.tar.gz
gitea-f4d3aaeeb9e1b11c5495e4608a3f52f316c35758.zip
refactor: remove redundant err declarations (#32381)
Diffstat (limited to 'routers/api')
-rw-r--r--routers/api/v1/repo/repo.go1
-rw-r--r--routers/api/v1/user/repo.go1
2 files changed, 0 insertions, 2 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index 4638e2ba5c..698ba3cc94 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -202,7 +202,6 @@ func Search(ctx *context.APIContext) {
}
}
- var err error
repos, count, err := repo_model.SearchRepository(ctx, opts)
if err != nil {
ctx.JSON(http.StatusInternalServerError, api.SearchError{
diff --git a/routers/api/v1/user/repo.go b/routers/api/v1/user/repo.go
index d0264d6b5a..6111341423 100644
--- a/routers/api/v1/user/repo.go
+++ b/routers/api/v1/user/repo.go
@@ -111,7 +111,6 @@ func ListMyRepos(ctx *context.APIContext) {
IncludeDescription: true,
}
- var err error
repos, count, err := repo_model.SearchRepository(ctx, opts)
if err != nil {
ctx.Error(http.StatusInternalServerError, "SearchRepository", err)