Add persons tab

This commit is contained in:
2020-10-09 17:03:30 +02:00
parent aea74bef27
commit 6e51533596
6 changed files with 125 additions and 1 deletions

15
handler/persons.go Normal file
View File

@@ -0,0 +1,15 @@
package handler
import (
"github.com/gin-gonic/gin"
"github.com/jackc/pgx/v4/pgxpool"
"net/http"
"trikotwaschliste/database"
)
func ShowPersonsList(pool *pgxpool.Pool) gin.HandlerFunc {
return func(c *gin.Context) {
c.HTML(http.StatusAccepted, "persons.html", database.DbPersons(pool))
}
}