Update docker-compose_dev, README and add auth basic

This commit is contained in:
2020-10-11 21:56:57 +02:00
parent 3e02fad96f
commit a82f090370
6 changed files with 26 additions and 6 deletions

View File

@@ -4,12 +4,21 @@ import (
"github.com/gin-gonic/gin"
"github.com/jackc/pgx/v4/pgxpool"
"trikotwaschliste/handler"
"trikotwaschliste/models"
)
func RoutesInit(router *gin.Engine, pool *pgxpool.Pool) {
func RoutesInit(router *gin.Engine, pool *pgxpool.Pool, config *models.Config) {
router.GET("/", handler.MainPage(pool))
router.GET("/credits", handler.Credits())
router.POST("/uploadname", handler.UploadName(pool))
router.GET("/persons", handler.ShowPersonsList(pool))
// Basic auth accounts
//authorized := router.Group("/admin", gin.BasicAuth(gin.Accounts{
//}))
// Basic auth routes
}