Added license. Cleanup and expanded documentation.

This commit is contained in:
mikestefanello 2021-12-31 10:09:52 -05:00
parent d35cf1d8a6
commit 86774ae781
6 changed files with 118 additions and 60 deletions

View file

@ -84,12 +84,10 @@ func (c *ForgotPassword) Post(ctx echo.Context) error {
ctx.Logger().Infof("generated password reset token for user %d", u.ID)
// Email the user
body := fmt.Sprintf(
err = c.Container.Mail.Send(ctx, u.Email, fmt.Sprintf(
"Go here to reset your password: %s",
ctx.Echo().Reverse("reset_password", u.ID, token),
)
ctx.Logger().Info(body)
err = c.Container.Mail.Send(ctx, u.Email, body)
))
if err != nil {
return c.Fail(ctx, err, "error sending password reset email")
}