mirror of
https://github.com/gabehf/Koito.git
synced 2026-04-23 04:21:51 -07:00
fix: use correct request body for alias requests
This commit is contained in:
parent
7b0cff0a07
commit
c2669b8d99
4 changed files with 61 additions and 23 deletions
|
|
@ -139,7 +139,14 @@ func UpdateApiKeyLabelHandler(store db.DB) http.HandlerFunc {
|
|||
return
|
||||
}
|
||||
|
||||
idStr := r.URL.Query().Get("id")
|
||||
err := r.ParseForm()
|
||||
if err != nil {
|
||||
l.Debug().Msg("UpdateApiKeyLabelHandler: Failed to parse form")
|
||||
utils.WriteError(w, "form is invalid", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
idStr := r.FormValue("id")
|
||||
if idStr == "" {
|
||||
l.Debug().Msg("UpdateApiKeyLabelHandler: Missing id parameter")
|
||||
utils.WriteError(w, "id is required", http.StatusBadRequest)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue