diff options
author | Gusted <williamzijl7@hotmail.com> | 2022-01-03 17:23:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-03 18:23:43 +0100 |
commit | 650a50a7ba8efcd8d02c4c93e5abc19f27e6c4b5 (patch) | |
tree | e23f5e66970a96be1599bfdd13fd203df005237b /routers/web/repo/setting.go | |
parent | 48aab263d1d60612be05a67c46172b5a5a718dba (diff) | |
download | gitea-650a50a7ba8efcd8d02c4c93e5abc19f27e6c4b5.tar.gz gitea-650a50a7ba8efcd8d02c4c93e5abc19f27e6c4b5.zip |
Remove unused route "/tasks/trigger" (#18160)
ref: https://github.com/go-gitea/gitea/pull/18160#issuecomment-1004091325
Diffstat (limited to 'routers/web/repo/setting.go')
-rw-r--r-- | routers/web/repo/setting.go | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/routers/web/repo/setting.go b/routers/web/repo/setting.go index 7ff83cc3d7..b7269b6718 100644 --- a/routers/web/repo/setting.go +++ b/routers/web/repo/setting.go @@ -994,31 +994,6 @@ func DeleteTeam(ctx *context.Context) { }) } -// parseOwnerAndRepo get repos by owner -func parseOwnerAndRepo(ctx *context.Context) (*user_model.User, *repo_model.Repository) { - owner, err := user_model.GetUserByName(ctx.Params(":username")) - if err != nil { - if user_model.IsErrUserNotExist(err) { - ctx.NotFound("GetUserByName", err) - } else { - ctx.ServerError("GetUserByName", err) - } - return nil, nil - } - - repo, err := repo_model.GetRepositoryByName(owner.ID, ctx.Params(":reponame")) - if err != nil { - if repo_model.IsErrRepoNotExist(err) { - ctx.NotFound("GetRepositoryByName", err) - } else { - ctx.ServerError("GetRepositoryByName", err) - } - return nil, nil - } - - return owner, repo -} - // GitHooks hooks of a repository func GitHooks(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("repo.settings.githooks") |