Add admin index page
This commit is contained in:
1 parent
e5c0df6f6f
commit
2a1ef7f2cb
5 files changed
+39
-11
No files matched your search
@@ -12,3 +12,13 @@ func AdminMainPage(pool *pgxpool.Pool) gin.HandlerFunc {
|
||||
c.HTML(http.StatusAccepted, "adminindex.html", database.DbAdminMainpage(pool))
|
||||
}
|
||||
}
|
||||
|
||||
func ChangeName(pool *pgxpool.Pool) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
selectedID := c.PostForm("names")
|
||||
personID := c.PostForm("personid")
|
||||
|
||||
database.ChangeName(pool, selectedID, personID)
|
||||
c.Redirect(302, "/admin")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user