[WIP] music platform user data scraper
teal-fm atproto

Resolved the robotic overlords pr comments

Changed files
+2 -10
pages
service
apikey
+1 -1
pages/cache.go
··· 2 2 3 3 import "sync" 4 4 5 - /// Cache for pages 5 + // Cache for pages 6 6 7 7 type TmplCache[K comparable, V any] struct { 8 8 data map[K]V
+1 -2
pages/pages.go
··· 131 131 func Cache(h http.Handler) http.Handler { 132 132 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 133 133 path := strings.Split(r.URL.Path, "?")[0] 134 - 135 - //We may want to change these, just took what tangled has and allows browser side caching 134 + // We may want to change these, just took what tangled has and allows browser side caching 136 135 if strings.HasSuffix(path, ".css") { 137 136 // on day for css files 138 137 w.Header().Set("Cache-Control", "public, max-age=86400")
-7
service/apikey/apikey.go
··· 203 203 newKeyValueToShow = newlyCreatedKeyID 204 204 } 205 205 206 - //t, err := template.New("apikeys").Funcs(funcMap).Parse(tmpl) 207 - if err != nil { 208 - http.Error(w, fmt.Sprintf("Error parsing template: %v", err), http.StatusInternalServerError) 209 - return 210 - } 211 - 212 206 data := struct { 213 207 Keys []*db_apikey.ApiKey // Assuming GetUserApiKeys returns this type 214 208 NewKeyID string // Changed from NewKey for clarity as it's an ID ··· 228 222 if err != nil { 229 223 log.Printf("Error executing template: %v", err) 230 224 } 231 - //t.Execute(w, data) 232 225 } 233 226 }