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)
|
||||
|
||||
unprotected := r.Group("u", HttpNoAuth())
|
||||
unprotected.POST("signin", HttpPostSignIn)
|
||||
unprotected.GET("signin", HttpAnySignIn)
|
||||
unprotected.POST("signin", HttpAnySignIn)
|
||||
unprotected.GET("recover", HttpGetRecover)
|
||||
|
||||
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 {
|
||||
c.Redirect(http.StatusTemporaryRedirect, "/p/home")
|
||||
} else {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by version.sh (@generated) DO NOT EDIT.
|
||||
package main
|
||||
var githash = "cd94f48"
|
||||
var githash = "d8cfb3c"
|
||||
var branch = "master"
|
||||
var buildstamp = "2024-11-17_16:02:29"
|
||||
var commits = "95"
|
||||
var version = "cd94f48-b95 - 2024-11-17_16:02:29"
|
||||
var buildstamp = "2024-11-17_16:26:08"
|
||||
var commits = "96"
|
||||
var version = "d8cfb3c-b96 - 2024-11-17_16:26:08"
|
||||
|
Loading…
Reference in New Issue
Block a user