diff --git a/alerts_api.go b/alerts_api.go index 656e319..055077d 100644 --- a/alerts_api.go +++ b/alerts_api.go @@ -114,7 +114,7 @@ func (s *Server) saveChannel(w http.ResponseWriter, r *http.Request, sc alertSco } s.save() s.audit(sc.org, sc.actor, "alert.channel.save", in.Name) - ok(w) + writeJSON(w, 200, map[string]any{"ok": true, "id": in.ID}) } func (s *Server) deleteChannel(w http.ResponseWriter, r *http.Request, sc alertScope) { diff --git a/docs/api-automation.md b/docs/api-automation.md index e8d7036..4a287e8 100644 --- a/docs/api-automation.md +++ b/docs/api-automation.md @@ -22,6 +22,7 @@ level, and a server key has no user, so `/api/me` and other per-user routes refu | `GET /api/edges` was session-only | accepts keys; an org key sees the edges its org may use | | No way to list orgs with a key | `GET /api/orgs` | | Key creation did not return the key's ID | create response now has `id` as well as `key` | +| Creating an alert channel returned only `{ok:true}` | response now includes the channel `id` | | `createOrg` added the caller as a member | skipped for server keys (they have no user) | ## Known remaining gaps (not blocking scripting)