Return the new alert channel's id

This commit is contained in:
Veillax committed 2026-10-27 16:54:50 -06:00
1 parent 8f3d303d7b
commit 617742e2b8
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -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) {
+1
View File
@@ -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)