Skip to content

Commit 141e0bf

Browse files
committed
placate lint
Signed-off-by: Andrew Thornton <[email protected]>
1 parent 4809243 commit 141e0bf

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

routers/web/repo/wiki.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616

1717
"code.gitea.io/gitea/models"
1818
"code.gitea.io/gitea/models/unit"
19-
unit_model "code.gitea.io/gitea/models/unit"
2019
"code.gitea.io/gitea/modules/base"
2120
"code.gitea.io/gitea/modules/context"
2221
"code.gitea.io/gitea/modules/git"
@@ -383,22 +382,22 @@ func renderEditPage(ctx *context.Context) {
383382
func WikiPost(ctx *context.Context) {
384383
switch ctx.FormString("action") {
385384
case "_new":
386-
if !ctx.Repo.CanWrite(unit_model.TypeWiki) {
385+
if !ctx.Repo.CanWrite(unit.TypeWiki) {
387386
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
388387
return
389388
}
390389
NewWikiPost(ctx)
391390
return
392391
case "_delete":
393-
if !ctx.Repo.CanWrite(unit_model.TypeWiki) {
392+
if !ctx.Repo.CanWrite(unit.TypeWiki) {
394393
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
395394
return
396395
}
397396
DeleteWikiPagePost(ctx)
398397
return
399398
}
400399

401-
if !ctx.Repo.CanWrite(unit_model.TypeWiki) {
400+
if !ctx.Repo.CanWrite(unit.TypeWiki) {
402401
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
403402
return
404403
}
@@ -424,14 +423,14 @@ func Wiki(ctx *context.Context) {
424423
WikiRevision(ctx)
425424
return
426425
case "_edit":
427-
if !ctx.Repo.CanWrite(unit_model.TypeWiki) {
426+
if !ctx.Repo.CanWrite(unit.TypeWiki) {
428427
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
429428
return
430429
}
431430
EditWiki(ctx)
432431
return
433432
case "_new":
434-
if !ctx.Repo.CanWrite(unit_model.TypeWiki) {
433+
if !ctx.Repo.CanWrite(unit.TypeWiki) {
435434
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
436435
return
437436
}

0 commit comments

Comments
 (0)