skazanull/web/server/handlers.go
Masahiko AMANO 37d40497d1 init(frontend): add frontend server
also add static files and auth page
2025-01-07 00:03:30 +03:00

17 lines
254 B
Go

package server
import (
"net/http"
"github.com/gin-gonic/gin"
)
func root(c *gin.Context) {
authorized := c.GetBool("authorized")
if authorized {
c.HTML(http.StatusOK, "quotes.html", nil)
} else {
c.HTML(http.StatusOK, "auth.html", nil)
}
}