Skip to content

Commit

Permalink
fix(api) missing DELETE option header
Browse files Browse the repository at this point in the history
  • Loading branch information
Cedrok committed Aug 8, 2024
1 parent a38fe64 commit 0bdd43d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions API/controllers/entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ func HandleGenericObjects(w http.ResponseWriter, r *http.Request) {
}
u.Respond(w, u.RespDataWrapper("successfully deleted objects", matchingObjects))
} else if r.Method == "OPTIONS" {
u.WriteOptionsHeader(w, "GET")
u.WriteOptionsHeader(w, "GET, DELETE")
} else {
matchingObjects = pie.Map(matchingObjects, func(object map[string]any) map[string]any {
entityStr := object["entity"].(string)
Expand Down Expand Up @@ -712,7 +712,7 @@ func HandleComplexFilters(w http.ResponseWriter, r *http.Request) {
}
u.Respond(w, u.RespDataWrapper("successfully deleted objects", matchingObjects))
} else if r.Method == "OPTIONS" {
u.WriteOptionsHeader(w, "POST")
u.WriteOptionsHeader(w, "POST, DELETE")
} else {
u.Respond(w, u.RespDataWrapper("successfully processed request", matchingObjects))
}
Expand Down

0 comments on commit 0bdd43d

Please sign in to comment.