Skip to content

Commit

Permalink
Merge pull request #882 from pulp/patchback/backports/2.21/f3204531b1…
Browse files Browse the repository at this point in the history
…dc8adb0506369c0571f69866d431cf/pr-880

[PR #880/f3204531 backport][2.21] Fix API root for the deb/copy/ endpoint for s3
  • Loading branch information
quba42 authored Aug 30, 2023
2 parents f873b61 + 88ae113 commit 9ae42b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES/879.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed the deb/copy/ API path for scenarios that modify the API root.
10 changes: 9 additions & 1 deletion pulp_deb/app/urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# This file is modeled after the corresponding file from pulp_rpm.
# If there are problems with the copy API, or domain support should be added, consult pulp_rpm.

from django.conf import settings
from django.urls import path

from .viewsets import CopyViewSet

urlpatterns = [path("pulp/api/v3/deb/copy/", CopyViewSet.as_view({"post": "create"}))]
V3_API_ROOT = settings.V3_API_ROOT_NO_FRONT_SLASH

urlpatterns = [
path(f"{V3_API_ROOT}deb/copy/", CopyViewSet.as_view({"post": "create"})),
]

0 comments on commit 9ae42b8

Please sign in to comment.