aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/auth
diff options
context:
space:
mode:
Diffstat (limited to 'backend/auth')
-rw-r--r--backend/auth/auth.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/auth/auth.go b/backend/auth/auth.go
index bc02821..2266c50 100644
--- a/backend/auth/auth.go
+++ b/backend/auth/auth.go
@@ -112,14 +112,14 @@ func signup(
func verifyRegistrationToken(ctx context.Context, queries *db.Queries, registrationToken *string) error {
if registrationToken == nil {
- return nil
+ return ErrNoRegistrationToken
}
exists, err := queries.IsRegistrationTokenValid(ctx, *registrationToken)
if err != nil {
- return nil
+ return err
}
if !exists {
- return nil
+ return ErrInvalidRegistrationToken
}
return nil
}