Skip to content

Commit

Permalink
Fixed bug with avoiding duplicated tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
Ju-Wiluis William Rodriguez Hernandez committed Jun 2, 2024
1 parent 8d31b07 commit 9d7899e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func LoginHandler(w http.ResponseWriter, r *http.Request) {
return
}

if token, err := redis.ValidateUser(userId); err != nil {
if token, err := redis.ValidateUser(userId); err == nil {
response := map[string]string{"token": token}
json.NewEncoder(w).Encode(response)
return
Expand Down

0 comments on commit 9d7899e

Please sign in to comment.