Skip to content

Commit 805b3a9

Browse files
authored
Switch endpoint (#71)
1 parent 54108e4 commit 805b3a9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

sentry/metric_alerts.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ func (s *MetricAlertsService) List(ctx context.Context, organizationSlug string,
7676

7777
// Get details on an issue alert.
7878
func (s *MetricAlertsService) Get(ctx context.Context, organizationSlug string, projectSlug string, id string) (*MetricAlert, *Response, error) {
79-
u := fmt.Sprintf("0/projects/%v/%v/alert-rules/%v/", organizationSlug, projectSlug, id)
79+
// TODO: Remove projectSlug argument
80+
u := fmt.Sprintf("0/organizations/%v/alert-rules/%v/", organizationSlug, id)
8081
req, err := s.client.NewRequest("GET", u, nil)
8182
if err != nil {
8283
return nil, nil, err

sentry/metric_alerts_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func TestMetricAlertService_Get(t *testing.T) {
116116
client, mux, _, teardown := setup()
117117
defer teardown()
118118

119-
mux.HandleFunc("/api/0/projects/the-interstellar-jurisdiction/pump-station/alert-rules/12345/", func(w http.ResponseWriter, r *http.Request) {
119+
mux.HandleFunc("/api/0/organizations/the-interstellar-jurisdiction/alert-rules/12345/", func(w http.ResponseWriter, r *http.Request) {
120120
assertMethod(t, "GET", r)
121121
w.Header().Set("Content-Type", "application/json")
122122
fmt.Fprint(w, `

0 commit comments

Comments
 (0)