From f890637bdbdbf3d09ad8a0e13aed74cd58fc0dc3 Mon Sep 17 00:00:00 2001 From: Quirin Pamp Date: Wed, 30 Aug 2023 09:16:03 +0200 Subject: [PATCH] Merge pull request #880 from ATIX-AG/fix_copy_api_root Fix API root for the deb/copy/ endpoint for s3 (cherry picked from commit f3204531b1dc8adb0506369c0571f69866d431cf) --- CHANGES/879.misc | 1 + pulp_deb/app/urls.py | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 CHANGES/879.misc diff --git a/CHANGES/879.misc b/CHANGES/879.misc new file mode 100644 index 000000000..7f585ad43 --- /dev/null +++ b/CHANGES/879.misc @@ -0,0 +1 @@ +Fixed the deb/copy/ API path for scenarios that modify the API root. diff --git a/pulp_deb/app/urls.py b/pulp_deb/app/urls.py index 5aed9ce68..679b06ecf 100644 --- a/pulp_deb/app/urls.py +++ b/pulp_deb/app/urls.py @@ -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"})), +]