Browse Source

Fix urls based on current frontend requests

master
Joshua Rubingh 6 months ago
parent
commit
ad25fceb39
  1. 4
      VRE/apps/study/urls.py
  2. 2
      VRE/apps/study/views.py

4
VRE/apps/study/urls.py

@ -4,8 +4,8 @@ from .views import Contributors, process_study_invite, validate_study_invite @@ -4,8 +4,8 @@ from .views import Contributors, process_study_invite, validate_study_invite
urlpatterns = [
path('<int:study_id>/contributors/', Contributors.as_view({'get': 'list'}), name='study-contributors'),
path('<int:study_id>/contributors/<int:contributor_id>/', Contributors.as_view({'get': 'get', 'put': 'update', 'delete': 'delete'}), name='study-contributors'),
path('<int:study_id>/contributors/<int:contributor_id>/', Contributors.as_view({'get': 'get', 'put': 'update', 'post': 'update', 'delete': 'delete'}), name='study-contributors'),
path('<int:study_id>/invite/', process_study_invite, name='study-invite'),
path('<int:study_id>/contributor/invite/', process_study_invite, name='study-invite'),
path('<int:study_id>/join/<path:jwt_token>', validate_study_invite, name='study-invite-join'),
]

2
VRE/apps/study/views.py

@ -174,7 +174,7 @@ class Studies(ModelViewSet): @@ -174,7 +174,7 @@ class Studies(ModelViewSet):
class Contributors(ModelViewSet):
http_method_names = ['get', 'put', 'delete']
http_method_names = ['get', 'put', 'post', 'delete']
queryset = StudyRole.objects.all()
serializer_class = ContributorSerializer

Loading…
Cancel
Save