mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-10 19:23:42 +08:00
optimize the logic for showing chat history
This commit is contained in:
@@ -86,7 +86,7 @@ func (s *Server) Run(webRoot embed.FS, path string, debug bool) {
|
||||
engine.Use(AuthorizeMiddleware(s))
|
||||
engine.Use(Recover)
|
||||
|
||||
engine.POST("test", s.TestHandle)
|
||||
engine.POST("api/test", s.TestHandle)
|
||||
engine.GET("api/session/get", s.GetSessionHandle)
|
||||
engine.POST("api/login", s.LoginHandle)
|
||||
engine.POST("api/logout", s.LogoutHandle)
|
||||
@@ -116,6 +116,9 @@ func (s *Server) Run(webRoot embed.FS, path string, debug bool) {
|
||||
if c.Request.URL.Path == "/favicon.ico" {
|
||||
c.Redirect(http.StatusMovedPermanently, "/chat/"+c.Request.URL.Path)
|
||||
}
|
||||
if c.Request.URL.Path == "/" {
|
||||
c.Redirect(http.StatusMovedPermanently, "/chat")
|
||||
}
|
||||
})
|
||||
|
||||
// process front-end web static files
|
||||
|
||||
Reference in New Issue
Block a user