Skip to content

Commit

Permalink
fix(backend): get clientrefid from queryparam
Browse files Browse the repository at this point in the history
  • Loading branch information
Adibov committed Dec 15, 2023
1 parent 4d036c1 commit f256de8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/backend_api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@ def __init__(self, *args, **kwargs):
path('', include(committee_routes)),
path('', include(user_route)),
path('payment/', views.PaymentViewSet.as_view({'post': 'payment'})),
path('payment/verify/', views.PaymentViewSet.as_view({'post': 'verify'})),
path('payment/verify/', views.PaymentViewSet.as_view({'get': 'verify', 'post': 'verify'})),
]
4 changes: 2 additions & 2 deletions backend/backend_api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ def payment(self, request):
return Response(
new_detailed_response(response['status'], response["message"]))

@action(methods=['POST'], detail=False)
@action(methods=['GET', 'POST'], detail=False)
def verify(self, request):
pid = request.data.get('clientrefid')
pid = request.query_params.get('clientrefid')
if pid is None:
return Response(new_detailed_response(
status.HTTP_400_BAD_REQUEST, "clientrefid is required"))
Expand Down

0 comments on commit f256de8

Please sign in to comment.