Add log buffer site

This commit is contained in:
2020-10-12 00:16:23 +02:00
parent 2a1ef7f2cb
commit 866a7a8b81
8 changed files with 134 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/jackc/pgx/v4/pgxpool"
"log"
"strconv"
"trikotwaschliste/logbuffer"
"trikotwaschliste/models"
)
@@ -61,3 +62,7 @@ func ChangeName(pool *pgxpool.Pool, id, personID string) bool {
return true
}
func Logs(queue *logbuffer.Queue) gin.H {
return gin.H{"items": queue.ToSlice()}
}