mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +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:
@@ -236,7 +236,7 @@ func LFSUnlock(ctx *context.Context) {
|
||||
ctx.NotFound("LFSUnlock", nil)
|
||||
return
|
||||
}
|
||||
_, err := git_model.DeleteLFSLockByID(ctx, ctx.ParamsInt64("lid"), ctx.Repo.Repository, ctx.Doer, true)
|
||||
_, err := git_model.DeleteLFSLockByID(ctx, ctx.PathParamInt64("lid"), ctx.Repo.Repository, ctx.Doer, true)
|
||||
if err != nil {
|
||||
ctx.ServerError("LFSUnlock", err)
|
||||
return
|
||||
@@ -251,7 +251,7 @@ func LFSFileGet(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
ctx.Data["LFSFilesLink"] = ctx.Repo.RepoLink + "/settings/lfs"
|
||||
oid := ctx.Params("oid")
|
||||
oid := ctx.PathParam("oid")
|
||||
|
||||
p := lfs.Pointer{Oid: oid}
|
||||
if !p.IsValid() {
|
||||
@@ -348,7 +348,7 @@ func LFSDelete(ctx *context.Context) {
|
||||
ctx.NotFound("LFSDelete", nil)
|
||||
return
|
||||
}
|
||||
oid := ctx.Params("oid")
|
||||
oid := ctx.PathParam("oid")
|
||||
p := lfs.Pointer{Oid: oid}
|
||||
if !p.IsValid() {
|
||||
ctx.NotFound("LFSDelete", nil)
|
||||
|
Reference in New Issue
Block a user