Archived
Template
1
0

Improves documentation (#13)

* Documents all env variables and adds an example project

* Adds godoc comments

* Fixed package naming issue
This commit is contained in:
Markus Tenghamn
2022-01-09 14:42:03 +01:00
committed by GitHub
parent 5d01717111
commit e586933a6b
31 changed files with 248 additions and 78 deletions

View File

@ -8,11 +8,13 @@ import (
"net/http"
)
// ResetPasswordPageData defines additional data needed to render the reset password page
type ResetPasswordPageData struct {
PageData
Token string
}
// ResetPassword renders the HTML page for resetting the users password
func (controller Controller) ResetPassword(c *gin.Context) {
token := c.Param("token")
pd := ResetPasswordPageData{
@ -26,6 +28,7 @@ func (controller Controller) ResetPassword(c *gin.Context) {
c.HTML(http.StatusOK, "resetpassword.html", pd)
}
// ResetPasswordPost handles post request used to reset users passwords
func (controller Controller) ResetPasswordPost(c *gin.Context) {
passwordError := "Your password must be 8 characters in length or longer"
resetError := "Could not reset password, please try again"