Add database
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user