documentation finished
This commit is contained in:
parent
40abac78bd
commit
ae335a1511
10 changed files with 105 additions and 48 deletions
|
@ -99,6 +99,12 @@ func (wp *Webpage) defineRoutes() {
|
|||
}
|
||||
c.JSON(200, gin.H{"logged_in": false, "username": ""})
|
||||
})
|
||||
auth.PUT("/user", func(c *gin.Context) {
|
||||
username := c.Query("username")
|
||||
password := c.Query("password")
|
||||
wp.Database.ChangeUserPassword(username, password)
|
||||
c.JSON(200, gin.H{"message": "success"})
|
||||
})
|
||||
auth.POST("/logout", func(c *gin.Context) {
|
||||
username, uExisting := c.GetPostForm("username")
|
||||
if uExisting == false || username == "" {
|
||||
|
|
Reference in a new issue