some changes
This commit is contained in:
@@ -5,6 +5,7 @@ package api_auth
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
@@ -79,6 +80,7 @@ func (h *authHandler) handleRegister(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
user, err := h.a.Register(req.Username, req.Email, req.Password)
|
||||
if err != nil {
|
||||
slog.Error("Failed to register user", "error", err)
|
||||
http.Error(w, "Registration failed", http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user