Fix: Broken category ID parsing for money transfers

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-02-06 11:10:58 +01:00
parent 5d41188876
commit 95dd2414b5
Signed by: luzifer
SSH key fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E

View file

@ -177,7 +177,7 @@ func (a apiServer) handleTransferMoney(w http.ResponseWriter, r *http.Request) {
} }
if r.URL.Query().Has("category") { if r.URL.Query().Has("category") {
if category, err = uuid.Parse(mux.Vars(r)["category"]); err != nil { if category, err = uuid.Parse(r.URL.Query().Get("category")); err != nil {
a.errorResponse(w, err, "parsing category", http.StatusBadRequest) a.errorResponse(w, err, "parsing category", http.StatusBadRequest)
return return
} }