mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-03 08:46:57 +00:00
fix lint
This commit is contained in:
@@ -84,10 +84,10 @@ type KnownHoldExport struct {
|
||||
|
||||
// CachedDataNote explains what cached data exists and how to access it
|
||||
type CachedDataNote struct {
|
||||
Message string `json:"message"`
|
||||
DeletionNotice string `json:"deletion_notice"`
|
||||
Message string `json:"message"`
|
||||
DeletionNotice string `json:"deletion_notice"`
|
||||
YourPDSCollections []string `json:"your_pds_collections"`
|
||||
HowToAccess string `json:"how_to_access"`
|
||||
HowToAccess string `json:"how_to_access"`
|
||||
}
|
||||
|
||||
// ExportUserData gathers all user data for GDPR export
|
||||
|
||||
@@ -83,7 +83,9 @@ func (h *SettingsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// Parse permissions JSON if present
|
||||
if hold.Permissions != "" {
|
||||
json.Unmarshal([]byte(hold.Permissions), &display.Permissions)
|
||||
if err := json.Unmarshal([]byte(hold.Permissions), &display.Permissions); err != nil {
|
||||
slog.Warn("Failed to parse permissions JSON", "component", "settings", "did", user.DID, "hold_did", hold.HoldDID, "error", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Add to data map for JavaScript
|
||||
@@ -221,11 +223,13 @@ func (h *UpdateDefaultHoldHandler) ServeHTTP(w http.ResponseWriter, r *http.Requ
|
||||
|
||||
if !hasAccess {
|
||||
w.Header().Set("Content-Type", "text/html")
|
||||
h.Templates.ExecuteTemplate(w, "alert", map[string]string{
|
||||
if err := h.Templates.ExecuteTemplate(w, "alert", map[string]string{
|
||||
"Class": "error",
|
||||
"Icon": "alert-circle",
|
||||
"Message": "You don't have access to this hold",
|
||||
})
|
||||
}); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,7 +217,6 @@ func getEnvOrDefault(key, defaultValue string) string {
|
||||
return defaultValue
|
||||
}
|
||||
|
||||
|
||||
// RequestCrawl sends a crawl request to the ATProto relay for the given hostname.
|
||||
// This makes the hold's PDS discoverable by the relay network.
|
||||
func RequestCrawl(relayEndpoint, publicURL string) error {
|
||||
|
||||
@@ -1497,13 +1497,13 @@ func (h *XRPCHandler) HandleGetQuota(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// HoldUserDataExport represents the GDPR data export from a hold service
|
||||
type HoldUserDataExport struct {
|
||||
ExportedAt time.Time `json:"exported_at"`
|
||||
HoldDID string `json:"hold_did"`
|
||||
UserDID string `json:"user_did"`
|
||||
IsCaptain bool `json:"is_captain"`
|
||||
CrewRecord *CrewExport `json:"crew_record,omitempty"`
|
||||
LayerRecords []LayerExport `json:"layer_records"`
|
||||
StatsRecords []StatsExport `json:"stats_records"`
|
||||
ExportedAt time.Time `json:"exported_at"`
|
||||
HoldDID string `json:"hold_did"`
|
||||
UserDID string `json:"user_did"`
|
||||
IsCaptain bool `json:"is_captain"`
|
||||
CrewRecord *CrewExport `json:"crew_record,omitempty"`
|
||||
LayerRecords []LayerExport `json:"layer_records"`
|
||||
StatsRecords []StatsExport `json:"stats_records"`
|
||||
}
|
||||
|
||||
// CrewExport represents a sanitized crew record for export
|
||||
|
||||
Reference in New Issue
Block a user