solve: PUT not POST — GLPI updates require the update verb
ci / vet (pull_request) Successful in 46s

The POST on /Ticket/<id> silently no-oped; the manual PUT worked.
Ticket: https://projects.knownelement.com/issues/824
This commit is contained in:
2026-09-06 13:29:17 -05:00
parent f7ffa441f6
commit 62564a4796
2 changed files with 1 additions and 1 deletions
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -228,7 +228,7 @@ func (b *bridge) handle(w http.ResponseWriter, r *http.Request) {
if err := b.glpi.followup(tid, fu); err != nil {
log.Printf("followup failed (continuing to solve): %v", err)
}
if err := b.glpi.do("POST", fmt.Sprintf("/Ticket/%d", tid), map[string]any{"input": map[string]any{"status": 5}}, nil); err != nil { // 11 = solved
if err := b.glpi.do("PUT", fmt.Sprintf("/Ticket/%d", tid), map[string]any{"input": map[string]any{"status": 5}}, nil); err != nil { // ticket status 5 = solved
log.Printf("solve failed: %v", err)
}
}()