Skip to content

Commit 34963ad

Browse files
chore(preprod): move endpoint to separate file to share with other preprod endpoints
1 parent f710f44 commit 34963ad

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

src/sentry/api/urls.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,7 @@
295295
from sentry.notifications.api.endpoints.user_notification_settings_providers import (
296296
UserNotificationSettingsProvidersEndpoint,
297297
)
298-
from sentry.preprod.api.endpoints.organization_preprod_artifact_assemble import (
299-
ProjectPreprodArtifactAssembleEndpoint,
300-
)
298+
from sentry.preprod.api.endpoints.urls import preprod_urls
301299
from sentry.relocation.api.endpoints.abort import RelocationAbortEndpoint
302300
from sentry.relocation.api.endpoints.artifacts.details import RelocationArtifactDetailsEndpoint
303301
from sentry.relocation.api.endpoints.artifacts.index import RelocationArtifactIndexEndpoint
@@ -2523,11 +2521,6 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]:
25232521
DifAssembleEndpoint.as_view(),
25242522
name="sentry-api-0-assemble-dif-files",
25252523
),
2526-
re_path(
2527-
r"^(?P<organization_id_or_slug>[^/]+)/(?P<project_id_or_slug>[^/]+)/files/preprodartifacts/assemble/$",
2528-
ProjectPreprodArtifactAssembleEndpoint.as_view(),
2529-
name="sentry-api-0-assemble-preprod-artifact-files",
2530-
),
25312524
re_path(
25322525
r"^(?P<organization_id_or_slug>[^/]+)/(?P<project_id_or_slug>[^/]+)/files/dsyms/unknown/$",
25332526
UnknownDebugFilesEndpoint.as_view(),
@@ -2992,6 +2985,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]:
29922985
ProjectSeerPreferencesEndpoint.as_view(),
29932986
name="sentry-api-0-project-seer-preferences",
29942987
),
2988+
*preprod_urls.preprod_urlpatterns,
29952989
]
29962990

29972991
TEAM_URLS = [
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from django.urls import re_path
2+
3+
from .organization_preprod_artifact_assemble import ProjectPreprodArtifactAssembleEndpoint
4+
5+
preprod_urlpatterns = [
6+
re_path(
7+
r"^(?P<organization_id_or_slug>[^\/]+)/(?P<project_id_or_slug>[^\/]+)/files/preprodartifacts/assemble/$",
8+
ProjectPreprodArtifactAssembleEndpoint.as_view(),
9+
name="sentry-api-0-assemble-preprod-artifact-files",
10+
),
11+
]

0 commit comments

Comments
 (0)