mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 18:58:38 +00:00
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:
@@ -147,7 +147,7 @@ func RunnersEdit(ctx *context.Context) {
|
||||
}
|
||||
|
||||
actions_shared.RunnerDetails(ctx, page,
|
||||
ctx.ParamsInt64(":runnerid"), rCtx.OwnerID, rCtx.RepoID,
|
||||
ctx.PathParamInt64(":runnerid"), rCtx.OwnerID, rCtx.RepoID,
|
||||
)
|
||||
ctx.HTML(http.StatusOK, rCtx.RunnerEditTemplate)
|
||||
}
|
||||
@@ -158,9 +158,9 @@ func RunnersEditPost(ctx *context.Context) {
|
||||
ctx.ServerError("getRunnersCtx", err)
|
||||
return
|
||||
}
|
||||
actions_shared.RunnerDetailsEditPost(ctx, ctx.ParamsInt64(":runnerid"),
|
||||
actions_shared.RunnerDetailsEditPost(ctx, ctx.PathParamInt64(":runnerid"),
|
||||
rCtx.OwnerID, rCtx.RepoID,
|
||||
rCtx.RedirectLink+url.PathEscape(ctx.Params(":runnerid")))
|
||||
rCtx.RedirectLink+url.PathEscape(ctx.PathParam(":runnerid")))
|
||||
}
|
||||
|
||||
func ResetRunnerRegistrationToken(ctx *context.Context) {
|
||||
@@ -179,7 +179,7 @@ func RunnerDeletePost(ctx *context.Context) {
|
||||
ctx.ServerError("getRunnersCtx", err)
|
||||
return
|
||||
}
|
||||
actions_shared.RunnerDeletePost(ctx, ctx.ParamsInt64(":runnerid"), rCtx.RedirectLink, rCtx.RedirectLink+url.PathEscape(ctx.Params(":runnerid")))
|
||||
actions_shared.RunnerDeletePost(ctx, ctx.PathParamInt64(":runnerid"), rCtx.RedirectLink, rCtx.RedirectLink+url.PathEscape(ctx.PathParam(":runnerid")))
|
||||
}
|
||||
|
||||
func RedirectToDefaultSetting(ctx *context.Context) {
|
||||
|
Reference in New Issue
Block a user