+1
-1
pages/cache.go
+1
-1
pages/cache.go
+1
-2
pages/pages.go
+1
-2
pages/pages.go
···
131
func Cache(h http.Handler) http.Handler {
132
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
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
136
if strings.HasSuffix(path, ".css") {
137
// on day for css files
138
w.Header().Set("Cache-Control", "public, max-age=86400")
···
131
func Cache(h http.Handler) http.Handler {
132
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
133
path := strings.Split(r.URL.Path, "?")[0]
134
+
// We may want to change these, just took what tangled has and allows browser side caching
135
if strings.HasSuffix(path, ".css") {
136
// on day for css files
137
w.Header().Set("Cache-Control", "public, max-age=86400")
-7
service/apikey/apikey.go
-7
service/apikey/apikey.go
···
203
newKeyValueToShow = newlyCreatedKeyID
204
}
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
data := struct {
213
Keys []*db_apikey.ApiKey // Assuming GetUserApiKeys returns this type
214
NewKeyID string // Changed from NewKey for clarity as it's an ID
···
228
if err != nil {
229
log.Printf("Error executing template: %v", err)
230
}
231
-
//t.Execute(w, data)
232
}
233
}
···
203
newKeyValueToShow = newlyCreatedKeyID
204
}
205
206
data := struct {
207
Keys []*db_apikey.ApiKey // Assuming GetUserApiKeys returns this type
208
NewKeyID string // Changed from NewKey for clarity as it's an ID
···
222
if err != nil {
223
log.Printf("Error executing template: %v", err)
224
}
225
}
226
}