promotion types
All checks were successful
Build and Publish / Metadata (push) Successful in 12s
Build and Publish / BuildAndDeployAmd64 (push) Successful in 1m7s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m20s

This commit is contained in:
matst80
2025-10-17 09:23:05 +02:00
parent a1833d6685
commit 918aa7d265
4 changed files with 831 additions and 0 deletions

View File

@@ -184,6 +184,22 @@ func (fs *FileServer) PromotionsHandler(w http.ResponseWriter, r *http.Request)
w.WriteHeader(http.StatusMethodNotAllowed)
}
func (fs *FileServer) PromotionPartHandler(w http.ResponseWriter, r *http.Request) {
idStr := r.PathValue("id")
if idStr == "" {
w.WriteHeader(http.StatusBadRequest)
fmt.Fprintf(w, "missing id")
return
}
_, ok := isValidId(idStr)
if !ok {
w.WriteHeader(http.StatusBadRequest)
fmt.Fprintf(w, "invalid id %s", idStr)
return
}
w.WriteHeader(http.StatusNotImplemented)
}
type JsonError struct {
Error string `json:"error"`
}