Skip to content

Commit

Permalink
placate lint
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Thornton <art27@cantab.net>
  • Loading branch information
zeripath committed Nov 10, 2021
1 parent 4809243 commit 141e0bf
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions routers/web/repo/wiki.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/unit"
unit_model "code.gitea.io/gitea/models/unit"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/git"
Expand Down Expand Up @@ -383,22 +382,22 @@ func renderEditPage(ctx *context.Context) {
func WikiPost(ctx *context.Context) {
switch ctx.FormString("action") {
case "_new":
if !ctx.Repo.CanWrite(unit_model.TypeWiki) {
if !ctx.Repo.CanWrite(unit.TypeWiki) {
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
return
}
NewWikiPost(ctx)
return
case "_delete":
if !ctx.Repo.CanWrite(unit_model.TypeWiki) {
if !ctx.Repo.CanWrite(unit.TypeWiki) {
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
return
}
DeleteWikiPagePost(ctx)
return
}

if !ctx.Repo.CanWrite(unit_model.TypeWiki) {
if !ctx.Repo.CanWrite(unit.TypeWiki) {
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
return
}
Expand All @@ -424,14 +423,14 @@ func Wiki(ctx *context.Context) {
WikiRevision(ctx)
return
case "_edit":
if !ctx.Repo.CanWrite(unit_model.TypeWiki) {
if !ctx.Repo.CanWrite(unit.TypeWiki) {
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
return
}
EditWiki(ctx)
return
case "_new":
if !ctx.Repo.CanWrite(unit_model.TypeWiki) {
if !ctx.Repo.CanWrite(unit.TypeWiki) {
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
return
}
Expand Down

0 comments on commit 141e0bf

Please sign in to comment.