diff --git a/api/launchpad/launchpad_views.py b/api/launchpad/launchpad_views.py index 88b6c6ea..e0ac0e2d 100644 --- a/api/launchpad/launchpad_views.py +++ b/api/launchpad/launchpad_views.py @@ -541,8 +541,7 @@ def get(self, request): class BaseAPI(APIView): def get_authenticated_user(self, request, launchpad_id): - data = request.data - auth_mail = data.pop('current_user', None) + auth_mail = request.query_params.get('current_user', None) auth_mail = auth_mail[0] if isinstance(auth_mail, list) else auth_mail if launchpad_id is None: return None, CustomResponse(general_message="No launchpad id provided").get_failure_response() @@ -553,7 +552,7 @@ def get_authenticated_user(self, request, launchpad_id): except LaunchPad.DoesNotExist: return None, CustomResponse(general_message="Invalid Launchpad ID").get_failure_response() return user, None - + class UserProfileAPI(BaseAPI): def get(self, request, launchpad_id=None): user, response = self.get_authenticated_user(request, launchpad_id) diff --git a/api/launchpad/urls.py b/api/launchpad/urls.py index 03840284..836fcd19 100644 --- a/api/launchpad/urls.py +++ b/api/launchpad/urls.py @@ -14,8 +14,8 @@ path('user-college-data/', launchpad_views.UserBasedCollegeData.as_view()), path('bulk-user-college-link/', launchpad_views.BulkLaunchpadUser.as_view()), path('list-participants-admin/', launchpad_views.LaunchPadListAdmin.as_view()), - path('user-profile//', launchpad_views.UserProfileAPI.as_view()), - path('socials//', launchpad_views.GetSocialsAPI.as_view()), - path('user-log//', launchpad_views.UserLogAPI.as_view()), - path('get-user-levels//', launchpad_views.UserLevelsAPI.as_view()), + path('user-details//', launchpad_views.UserProfileAPI.as_view()), + path('socials//', launchpad_views.GetSocialsAPI.as_view()), + path('user-log//', launchpad_views.UserLogAPI.as_view()), + path('get-user-levels//', launchpad_views.UserLevelsAPI.as_view()), ]