price pipeline

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-06-13 12:33:39 +02:00
commit d9581d7f7e
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
16 changed files with 790 additions and 10 deletions

View file

@ -0,0 +1,16 @@
package handler
import (
"encoding/json"
"net/http"
)
func writeJSON(w http.ResponseWriter, status int, v any) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(status)
json.NewEncoder(w).Encode(v)
}
func writeError(w http.ResponseWriter, status int, msg string) {
writeJSON(w, status, map[string]string{"error": msg})
}