fix: Use name without json

This commit is contained in:
Dries De Peuter 2024-04-08 00:30:39 +02:00
parent 231ebefe91
commit c4d46b935f
No known key found for this signature in database

View file

@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"os"
"strings"
"time"
"github.com/bep/debounce"
@ -51,7 +52,7 @@ func (s *WellKnownService) GetData(ctx context.Context) (*wkRegistry, error) {
if err := json.Unmarshal([]byte(data), &d); err != nil {
klog.Error(err)
}
reg[name] = d
reg[strings.TrimSuffix(name, ".json")] = d
}
return &reg, nil