From 020c4d05bf9864be3a4ca653f6c37be6969948b4 Mon Sep 17 00:00:00 2001 From: maru Date: Thu, 28 Dec 2023 21:17:09 -0500 Subject: [PATCH] Fix calls to isValidUsername --- api/account.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/account.go b/api/account.go index a4da5e1..9d51f1d 100644 --- a/api/account.go +++ b/api/account.go @@ -68,7 +68,7 @@ func HandleAccountRegister(w http.ResponseWriter, r *http.Request) { return } - if isValidUsername(request.Username) { + if !isValidUsername(request.Username) { http.Error(w, "invalid username", http.StatusBadRequest) return } @@ -116,7 +116,7 @@ func HandleAccountLogin(w http.ResponseWriter, r *http.Request) { return } - if isValidUsername(request.Username) { + if !isValidUsername(request.Username) { http.Error(w, "invalid username", http.StatusBadRequest) return }