mirror of
https://github.com/i701/sarlink-portal-api.git
synced 2025-06-06 11:26:19 +00:00
Add PaymentDetailAPIView for retrieving payment details and update URL routing
This commit is contained in:
parent
02f680d579
commit
93e50b696c
@ -1,9 +1,9 @@
|
||||
# billing/urls.py
|
||||
from django.urls import path
|
||||
from .views import ListCreatePaymentView, VerifyPaymentView
|
||||
from .views import ListCreatePaymentView, VerifyPaymentView, PaymentDetailAPIView
|
||||
|
||||
urlpatterns = [
|
||||
path("payment/", ListCreatePaymentView.as_view(), name="create-payment"),
|
||||
path("payment/<str:pk>/", ListCreatePaymentView.as_view(), name="retrieve-payment"),
|
||||
path("payment/<str:pk>/", PaymentDetailAPIView.as_view(), name="retrieve-payment"),
|
||||
path("verify-payment/", VerifyPaymentView.as_view(), name="verify-payment"),
|
||||
]
|
||||
|
@ -70,7 +70,7 @@ class ListCreatePaymentView(StaffEditorPermissionMixin, generics.ListCreateAPIVi
|
||||
|
||||
|
||||
class PaymentDetailAPIView(StaffEditorPermissionMixin, generics.RetrieveAPIView):
|
||||
queryset = Payment.objects.select_related("user", "devices").all()
|
||||
queryset = Payment.objects.select_related("user").all()
|
||||
serializer_class = PaymentSerializer
|
||||
lookup_field = "pk"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user