Add database

This commit is contained in:
2020-10-08 14:30:30 +02:00
parent 7ee52c758b
commit 135cd976d0
3 changed files with 22 additions and 10 deletions

View File

@@ -2,12 +2,13 @@ package handler
import (
"github.com/gin-gonic/gin"
"github.com/jackc/pgx/v4/pgxpool"
"net/http"
"trikotwaschliste/database"
)
func MainPage() gin.HandlerFunc {
func MainPage(pool *pgxpool.Pool) gin.HandlerFunc {
return func(c *gin.Context) {
c.HTML(http.StatusAccepted, "index.html", database.DbMainpage())
c.HTML(http.StatusAccepted, "index.html", database.DbMainpage(pool))
}
}