A container registry that uses the AT Protocol for manifest storage and S3 for blob storage. atcr.io
docker container atproto go

fix lint

evan.jarrett.net ab7e7c7a 3409af6c

verified
Changed files
+17 -14
pkg
appview
db
handlers
hold
+3 -3
pkg/appview/db/export.go
··· 84 85 // CachedDataNote explains what cached data exists and how to access it 86 type CachedDataNote struct { 87 - Message string `json:"message"` 88 - DeletionNotice string `json:"deletion_notice"` 89 YourPDSCollections []string `json:"your_pds_collections"` 90 - HowToAccess string `json:"how_to_access"` 91 } 92 93 // ExportUserData gathers all user data for GDPR export
··· 84 85 // CachedDataNote explains what cached data exists and how to access it 86 type CachedDataNote struct { 87 + Message string `json:"message"` 88 + DeletionNotice string `json:"deletion_notice"` 89 YourPDSCollections []string `json:"your_pds_collections"` 90 + HowToAccess string `json:"how_to_access"` 91 } 92 93 // ExportUserData gathers all user data for GDPR export
+7 -3
pkg/appview/handlers/settings.go
··· 83 84 // Parse permissions JSON if present 85 if hold.Permissions != "" { 86 - json.Unmarshal([]byte(hold.Permissions), &display.Permissions) 87 } 88 89 // Add to data map for JavaScript ··· 221 222 if !hasAccess { 223 w.Header().Set("Content-Type", "text/html") 224 - h.Templates.ExecuteTemplate(w, "alert", map[string]string{ 225 "Class": "error", 226 "Icon": "alert-circle", 227 "Message": "You don't have access to this hold", 228 - }) 229 return 230 } 231 }
··· 83 84 // Parse permissions JSON if present 85 if hold.Permissions != "" { 86 + if err := json.Unmarshal([]byte(hold.Permissions), &display.Permissions); err != nil { 87 + slog.Warn("Failed to parse permissions JSON", "component", "settings", "did", user.DID, "hold_did", hold.HoldDID, "error", err) 88 + } 89 } 90 91 // Add to data map for JavaScript ··· 223 224 if !hasAccess { 225 w.Header().Set("Content-Type", "text/html") 226 + if err := h.Templates.ExecuteTemplate(w, "alert", map[string]string{ 227 "Class": "error", 228 "Icon": "alert-circle", 229 "Message": "You don't have access to this hold", 230 + }); err != nil { 231 + http.Error(w, err.Error(), http.StatusInternalServerError) 232 + } 233 return 234 } 235 }
-1
pkg/hold/config.go
··· 217 return defaultValue 218 } 219 220 - 221 // RequestCrawl sends a crawl request to the ATProto relay for the given hostname. 222 // This makes the hold's PDS discoverable by the relay network. 223 func RequestCrawl(relayEndpoint, publicURL string) error {
··· 217 return defaultValue 218 } 219 220 // RequestCrawl sends a crawl request to the ATProto relay for the given hostname. 221 // This makes the hold's PDS discoverable by the relay network. 222 func RequestCrawl(relayEndpoint, publicURL string) error {
+7 -7
pkg/hold/pds/xrpc.go
··· 1497 1498 // HoldUserDataExport represents the GDPR data export from a hold service 1499 type HoldUserDataExport struct { 1500 - ExportedAt time.Time `json:"exported_at"` 1501 - HoldDID string `json:"hold_did"` 1502 - UserDID string `json:"user_did"` 1503 - IsCaptain bool `json:"is_captain"` 1504 - CrewRecord *CrewExport `json:"crew_record,omitempty"` 1505 - LayerRecords []LayerExport `json:"layer_records"` 1506 - StatsRecords []StatsExport `json:"stats_records"` 1507 } 1508 1509 // CrewExport represents a sanitized crew record for export
··· 1497 1498 // HoldUserDataExport represents the GDPR data export from a hold service 1499 type HoldUserDataExport struct { 1500 + ExportedAt time.Time `json:"exported_at"` 1501 + HoldDID string `json:"hold_did"` 1502 + UserDID string `json:"user_did"` 1503 + IsCaptain bool `json:"is_captain"` 1504 + CrewRecord *CrewExport `json:"crew_record,omitempty"` 1505 + LayerRecords []LayerExport `json:"layer_records"` 1506 + StatsRecords []StatsExport `json:"stats_records"` 1507 } 1508 1509 // CrewExport represents a sanitized crew record for export