fix home
This commit is contained in:
parent
d8cfb3cf00
commit
49417729ec
3
admin.go
3
admin.go
@ -133,7 +133,8 @@ func (a *AdminConfig) Run() {
|
|||||||
protected.GET("home", HttpAnyHome)
|
protected.GET("home", HttpAnyHome)
|
||||||
|
|
||||||
unprotected := r.Group("u", HttpNoAuth())
|
unprotected := r.Group("u", HttpNoAuth())
|
||||||
unprotected.POST("signin", HttpPostSignIn)
|
unprotected.GET("signin", HttpAnySignIn)
|
||||||
|
unprotected.POST("signin", HttpAnySignIn)
|
||||||
unprotected.GET("recover", HttpGetRecover)
|
unprotected.GET("recover", HttpGetRecover)
|
||||||
|
|
||||||
srv := &http.Server{
|
srv := &http.Server{
|
||||||
|
2
http.go
2
http.go
@ -23,7 +23,7 @@ func HttpNoAuth() gin.HandlerFunc {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func HttpPostSignIn(c *gin.Context) {
|
func HttpAnySignIn(c *gin.Context) {
|
||||||
if GetWebSessionUserID(c) > 0 {
|
if GetWebSessionUserID(c) > 0 {
|
||||||
c.Redirect(http.StatusTemporaryRedirect, "/p/home")
|
c.Redirect(http.StatusTemporaryRedirect, "/p/home")
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Code generated by version.sh (@generated) DO NOT EDIT.
|
// Code generated by version.sh (@generated) DO NOT EDIT.
|
||||||
package main
|
package main
|
||||||
var githash = "cd94f48"
|
var githash = "d8cfb3c"
|
||||||
var branch = "master"
|
var branch = "master"
|
||||||
var buildstamp = "2024-11-17_16:02:29"
|
var buildstamp = "2024-11-17_16:26:08"
|
||||||
var commits = "95"
|
var commits = "96"
|
||||||
var version = "cd94f48-b95 - 2024-11-17_16:02:29"
|
var version = "d8cfb3c-b96 - 2024-11-17_16:26:08"
|
||||||
|
Loading…
Reference in New Issue
Block a user