Add log buffer site
This commit is contained in:
@@ -4,10 +4,11 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
"trikotwaschliste/handler"
|
||||
"trikotwaschliste/logbuffer"
|
||||
"trikotwaschliste/models"
|
||||
)
|
||||
|
||||
func RoutesInit(router *gin.Engine, pool *pgxpool.Pool, config *models.Config) {
|
||||
func RoutesInit(router *gin.Engine, pool *pgxpool.Pool, config *models.Config, logbuf *logbuffer.Queue) {
|
||||
router.GET("/", handler.MainPage(pool))
|
||||
router.GET("/credits", handler.Credits())
|
||||
router.POST("/uploadname", handler.UploadName(pool))
|
||||
@@ -22,5 +23,6 @@ func RoutesInit(router *gin.Engine, pool *pgxpool.Pool, config *models.Config) {
|
||||
// Basic auth routes
|
||||
authorized.GET("/", handler.AdminMainPage(pool))
|
||||
authorized.POST("/changename", handler.ChangeName(pool))
|
||||
authorized.GET("/logs", handler.Logs(logbuf))
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user