Refactor names (#31405)
This PR only does "renaming": * `Route` should be `Router` (and chi router is also called "router") * `Params` should be `PathParam` (to distingush it from URL query param, and to match `FormString`) * Use lower case for private functions to avoid exposing or abusing
This commit is contained in:
parent
17baf1af10
commit
43c7a2e7b1
177 changed files with 837 additions and 837 deletions
|
@ -30,7 +30,7 @@ func GitHooksEdit(ctx *context.Context) {
|
|||
ctx.Data["Title"] = ctx.Tr("repo.settings.githooks")
|
||||
ctx.Data["PageIsSettingsGitHooks"] = true
|
||||
|
||||
name := ctx.Params(":name")
|
||||
name := ctx.PathParam(":name")
|
||||
hook, err := ctx.Repo.GitRepo.GetHook(name)
|
||||
if err != nil {
|
||||
if err == git.ErrNotValidHook {
|
||||
|
@ -46,7 +46,7 @@ func GitHooksEdit(ctx *context.Context) {
|
|||
|
||||
// GitHooksEditPost response for editing a git hook of a repository
|
||||
func GitHooksEditPost(ctx *context.Context) {
|
||||
name := ctx.Params(":name")
|
||||
name := ctx.PathParam(":name")
|
||||
hook, err := ctx.Repo.GitRepo.GetHook(name)
|
||||
if err != nil {
|
||||
if err == git.ErrNotValidHook {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue