This commit is contained in:
shoopea 2024-11-17 17:26:16 +01:00
parent d8cfb3cf00
commit 49417729ec
3 changed files with 7 additions and 6 deletions

View File

@ -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{

View File

@ -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 {

View File

@ -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"