Browse Source

#2477

remove /panel path
tags/v1.22.7.2^2
chenyifan01 3 years ago
parent
commit
fc1164df88
2 changed files with 0 additions and 26 deletions
  1. +0
    -24
      routers/kanban/kanban.go
  2. +0
    -2
      routers/routes/routes.go

+ 0
- 24
routers/kanban/kanban.go View File

@@ -1,24 +0,0 @@
package kanban

import (
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
"net/http"
"os"
"path"
"time"
)

func Index(ctx *context.Context) {
file := path.Join(setting.StaticRootPath, "public/kanban/index.html")
name := "index.html"
f, err := os.Open(file)
if err != nil {
ctx.HTML(http.StatusNotFound, base.TplName("status/404"))
return
}
defer f.Close()
ctx.Resp.Header().Set("Content-Type", "text/html")
http.ServeContent(ctx.Resp, ctx.Req.Request, name, time.Now(), f)
}

+ 0
- 2
routers/routes/routes.go View File

@@ -6,7 +6,6 @@ package routes

import (
"bytes"
"code.gitea.io/gitea/routers/kanban"
"encoding/gob"
"net/http"
"path"
@@ -328,7 +327,6 @@ func RegisterRoutes(m *macaron.Macaron) {
})
m.Get("/", routers.Home)
m.Get("/dashboard", routers.Dashboard)
m.Get("/panel", kanban.Index)
go routers.SocketManager.Run()
m.Get("/action/notification", routers.ActionNotification)
m.Get("/recommend/home", routers.RecommendHomeInfo)


Loading…
Cancel
Save