mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-14 05:23:09 +00:00
更新大量功能
This commit is contained in:
@@ -32,6 +32,10 @@ func (a *IndexController) initRouter(g *gin.RouterGroup) {
|
||||
}
|
||||
|
||||
func (a *IndexController) index(c *gin.Context) {
|
||||
if session.IsLogin(c) {
|
||||
c.Redirect(http.StatusTemporaryRedirect, "xui/")
|
||||
return
|
||||
}
|
||||
html(c, "login.html", "登录", nil)
|
||||
}
|
||||
|
||||
@@ -68,5 +72,5 @@ func (a *IndexController) logout(c *gin.Context) {
|
||||
logger.Info("user", user.Id, "logout")
|
||||
}
|
||||
session.ClearSession(c)
|
||||
c.Redirect(http.StatusTemporaryRedirect, "")
|
||||
c.Redirect(http.StatusTemporaryRedirect, c.GetString("base_path"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user