Add admin page
This commit is contained in:
14
handler/admin.go
Normal file
14
handler/admin.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
"net/http"
|
||||
"trikotwaschliste/database"
|
||||
)
|
||||
|
||||
func AdminMainPage(pool *pgxpool.Pool) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
c.HTML(http.StatusAccepted, "adminindex.html", database.DbAdminMainpage(pool))
|
||||
}
|
||||
}
|
@@ -25,6 +25,6 @@ func UploadName(pool *pgxpool.Pool) gin.HandlerFunc {
|
||||
|
||||
func Credits() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
c.HTML(http.StatusAccepted, "credits.html", gin.H{"version":"1.0"})
|
||||
c.HTML(http.StatusAccepted, "credits.html", gin.H{"version":"1.1"})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user