Add log buffer site
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
"net/http"
|
||||
"trikotwaschliste/database"
|
||||
"trikotwaschliste/logbuffer"
|
||||
)
|
||||
|
||||
func AdminMainPage(pool *pgxpool.Pool) gin.HandlerFunc {
|
||||
@@ -22,3 +23,9 @@ func ChangeName(pool *pgxpool.Pool) gin.HandlerFunc {
|
||||
c.Redirect(302, "/admin")
|
||||
}
|
||||
}
|
||||
|
||||
func Logs(queue *logbuffer.Queue) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
c.HTML(http.StatusAccepted, "adminlogs.html", database.Logs(queue))
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user