~netlandish/gobwebs

7922e44c8973344cb614e250469d2c2a48aee78b — Peter Sanchez 2 years ago 0ae025c
Passing in user instance on cases where it makes sense for data processing by external apps
1 files changed, 4 insertions(+), 1 deletions(-)

M accounts/routes.go
M accounts/routes.go => accounts/routes.go +4 -1
@@ 518,6 518,7 @@ func (s *Service) ForgotPasswordConfPOST(c echo.Context) error {
		return err
	}

	c.Set("user", user)
	if err := s.fetch.ProcessSuccessfulPasswordReset(c); err != nil {
		return err
	}


@@ 581,6 582,7 @@ func (s *Service) ConfirmEmailConf(c echo.Context) error {
		return err
	}

	c.Set("user", user)
	if err := s.fetch.ProcessSuccessfulEmailConfirmation(c); err != nil {
		return err
	}


@@ 743,7 745,7 @@ func (s *Service) UpdateEmailConf(c echo.Context) error {
	}

	// Everything good, load user for verification
	_, err = s.fetch.FromDB(gctx.Server.DB, conf.UserID, false)
	user, err := s.fetch.FromDB(gctx.Server.DB, conf.UserID, false)
	if err != nil {
		if err == sql.ErrNoRows {
			// Should never be reached


@@ 772,6 774,7 @@ func (s *Service) UpdateEmailConf(c echo.Context) error {
		return err
	}

	c.Set("user", user)
	if err := s.fetch.ProcessSuccessfulEmailUpdate(c); err != nil {
		return err
	}