Implement async manual CSV ingest, unified UI pagination/filters, and serial placeholder strategy

This commit is contained in:
2026-02-21 22:14:04 +03:00
parent ca762a658b
commit c84102d2f1
44 changed files with 3314 additions and 342 deletions

View File

@@ -3,6 +3,7 @@ package api
import (
"encoding/json"
"io"
"log"
"net/http"
"regexp"
"strconv"
@@ -61,7 +62,9 @@ func decodeJSON(r *http.Request, dest any) error {
func writeJSON(w http.ResponseWriter, status int, payload any) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(status)
_ = json.NewEncoder(w).Encode(payload)
if err := json.NewEncoder(w).Encode(payload); err != nil {
log.Printf("write json response failed status=%d err=%v", status, err)
}
}
func writeError(w http.ResponseWriter, status int, message string) {