fix README, SYNC, DATENSCHUTZ
Some checks failed
Dynamic Branch Deploy / build-and-deploy (push) Has been cancelled
Some checks failed
Dynamic Branch Deploy / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -137,7 +137,6 @@ func handleSubmitName(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// Validierung
|
||||
if len(req.Name) > 4 {
|
||||
http.Error(w, "Zu lang", 400)
|
||||
return
|
||||
@@ -297,7 +296,6 @@ func handleClaimDelete(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
log.Printf("🗑️ USER DELETE: Session %s deleted via code", req.SessionID)
|
||||
|
||||
// Aus Listen entfernen
|
||||
rdb.ZRem(ctx, "leaderboard:unverified", req.SessionID)
|
||||
rdb.ZRem(ctx, "leaderboard:public", req.SessionID)
|
||||
|
||||
@@ -318,7 +316,6 @@ func generateClaimCode() string {
|
||||
func handleAdminBadwords(w http.ResponseWriter, r *http.Request) {
|
||||
key := "config:badwords"
|
||||
|
||||
// GET: Liste abrufen
|
||||
if r.Method == http.MethodGet {
|
||||
words, _ := rdb.SMembers(ctx, key).Result()
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
@@ -326,12 +323,11 @@ func handleAdminBadwords(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// POST: Hinzufügen oder Löschen
|
||||
if r.Method == http.MethodPost {
|
||||
// Wir nutzen ein einfaches Struct für den Request
|
||||
|
||||
type WordReq struct {
|
||||
Word string `json:"word"`
|
||||
Action string `json:"action"` // "add" oder "remove"
|
||||
Action string `json:"action"`
|
||||
}
|
||||
var req WordReq
|
||||
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user