feat: simplify data and add cache to LocalFsAdapter

This commit is contained in:
Max Richter
2025-10-05 22:20:43 +02:00
parent fa283d5dd7
commit 6d92c92797
8 changed files with 196 additions and 160 deletions

View File

@@ -3,8 +3,6 @@ package handler
import (
"encoding/json"
"net/http"
"git.max-richter.dev/max/marka/server-new/internal/adapters"
)
type ErrorResponse struct {
@@ -20,8 +18,3 @@ func writeJSON(w http.ResponseWriter, code int, v any) {
w.WriteHeader(code)
_ = json.NewEncoder(w).Encode(v)
}
func writeFile(w http.ResponseWriter, file *adapters.FsFile) {
w.Header().Set("Content-Type", file.Type)
w.Write(file.Content)
}