Return the new alert channel's id
This commit is contained in:
1 parent
8f3d303d7b
commit
617742e2b8
2 files changed
+2
-1
No files matched your search
+1
-1
@@ -114,7 +114,7 @@ func (s *Server) saveChannel(w http.ResponseWriter, r *http.Request, sc alertSco
|
|||||||
}
|
}
|
||||||
s.save()
|
s.save()
|
||||||
s.audit(sc.org, sc.actor, "alert.channel.save", in.Name)
|
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) {
|
func (s *Server) deleteChannel(w http.ResponseWriter, r *http.Request, sc alertScope) {
|
||||||
|
|||||||
@@ -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 |
|
| `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` |
|
| 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` |
|
| 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) |
|
| `createOrg` added the caller as a member | skipped for server keys (they have no user) |
|
||||||
|
|
||||||
## Known remaining gaps (not blocking scripting)
|
## Known remaining gaps (not blocking scripting)
|
||||||
|
|||||||
Reference in new issue
Block a user