Add migrations

This commit is contained in:
2020-10-09 15:10:13 +02:00
parent 135cd976d0
commit 011619d3c3
8 changed files with 81 additions and 9 deletions

View File

@@ -12,3 +12,13 @@ func MainPage(pool *pgxpool.Pool) gin.HandlerFunc {
c.HTML(http.StatusAccepted, "index.html", database.DbMainpage(pool))
}
}
func UploadName(pool *pgxpool.Pool) gin.HandlerFunc {
return func(c *gin.Context) {
selectedID := c.PostForm("names")
washID := c.PostForm("washid")
database.UploadName(pool, selectedID, washID)
c.Redirect(302, "/")
}
}