Skip to content

Commit fb08fc3

Browse files
authored
fix(alerts): Add missing slash to the preview route (#50211)
I'm going to just disable the feature flag until it deploys because requests will fail until both are deployed
1 parent 46e7102 commit fb08fc3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/sentry/api/urls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2089,7 +2089,7 @@
20892089
name="sentry-api-0-project-rules-configuration",
20902090
),
20912091
url(
2092-
r"^(?P<organization_slug>[^\/]+)/(?P<project_slug>[^\/]+)/rules/(?P<rule_id>[^\/]+)/$",
2092+
r"^(?P<organization_slug>[^\/]+)/(?P<project_slug>[^\/]+)/rules/(?P<rule_id>\d+)/$",
20932093
ProjectRuleDetailsEndpoint.as_view(),
20942094
name="sentry-api-0-project-rule-details",
20952095
),
@@ -2104,7 +2104,7 @@
21042104
name="sentry-api-0-metric-rule-snooze",
21052105
),
21062106
url(
2107-
r"^(?P<organization_slug>[^\/]+)/(?P<project_slug>[^\/]+)/rules/preview$",
2107+
r"^(?P<organization_slug>[^\/]+)/(?P<project_slug>[^\/]+)/rules/preview/$",
21082108
ProjectRulePreviewEndpoint.as_view(),
21092109
name="sentry-api-0-project-rule-preview",
21102110
),

static/app/views/alerts/create.spec.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ describe('ProjectAlertsCreate', function () {
462462
groups[i].lastTriggered = date;
463463
}
464464
const mock = MockApiClient.addMockResponse({
465-
url: '/projects/org-slug/project-slug/rules/preview',
465+
url: '/projects/org-slug/project-slug/rules/preview/',
466466
method: 'POST',
467467
body: groups,
468468
headers: {
@@ -513,7 +513,7 @@ describe('ProjectAlertsCreate', function () {
513513

514514
it('invalid preview alert', async () => {
515515
const mock = MockApiClient.addMockResponse({
516-
url: '/projects/org-slug/project-slug/rules/preview',
516+
url: '/projects/org-slug/project-slug/rules/preview/',
517517
method: 'POST',
518518
statusCode: 400,
519519
});
@@ -535,7 +535,7 @@ describe('ProjectAlertsCreate', function () {
535535

536536
it('empty preview table', async () => {
537537
const mock = MockApiClient.addMockResponse({
538-
url: '/projects/org-slug/project-slug/rules/preview',
538+
url: '/projects/org-slug/project-slug/rules/preview/',
539539
method: 'POST',
540540
body: [],
541541
headers: {

static/app/views/alerts/rules/issue/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ class IssueRuleEditor extends AsyncView<Props, State> {
391391
}
392392
// we currently don't have a way to parse objects from query params, so this method is POST for now
393393
this.api
394-
.requestPromise(`/projects/${organization.slug}/${project.slug}/rules/preview`, {
394+
.requestPromise(`/projects/${organization.slug}/${project.slug}/rules/preview/`, {
395395
method: 'POST',
396396
includeAllArgs: true,
397397
query: {

0 commit comments

Comments
 (0)