mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-04 03:23:15 -06:00
change error message a bit
This commit is contained in:
parent
3382f4deab
commit
e94c686dc5
2 changed files with 2 additions and 2 deletions
|
|
@ -114,7 +114,7 @@ func (p *processor) ConfirmEmail(ctx context.Context, token string) (*gtsmodel.U
|
|||
}
|
||||
|
||||
if user.ConfirmationSentAt.Before(time.Now().Add(-oneWeek)) {
|
||||
return nil, gtserror.NewErrorForbidden(errors.New("confirmation token more than a week old, please request a new one"))
|
||||
return nil, gtserror.NewErrorForbidden(errors.New("ConfirmEmail: confirmation token expired"))
|
||||
}
|
||||
|
||||
// mark the user's email address as confirmed + remove the unconfirmed address and the token
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ func (suite *EmailConfirmTestSuite) TestConfirmEmailOldToken() {
|
|||
// confirm with the token set above
|
||||
updatedUser, errWithCode := suite.user.ConfirmEmail(ctx, "1d1aa44b-afa4-49c8-ac4b-eceb61715cc6")
|
||||
suite.Nil(updatedUser)
|
||||
suite.EqualError(errWithCode, "confirmation token more than a week old, please request a new one")
|
||||
suite.EqualError(errWithCode, "ConfirmEmail: confirmation token expired")
|
||||
}
|
||||
|
||||
func TestEmailConfirmTestSuite(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue