Skip to content

Commit

Permalink
Merge pull request #558 from bounswe/BACKEND-554
Browse files Browse the repository at this point in the history
delete duplicate code
  • Loading branch information
skywllker authored Nov 22, 2024
2 parents f2da378 + 16d303f commit aa1b430
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions backend/app/views_directory/profileviews.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,4 @@ def view_other_profile(request, username):
serializer = ProfileSerializer(profile)
return Response(serializer.data, status=status.HTTP_200_OK)

@api_view(['GET'])
@permission_classes([IsAuthenticated])
def view_other_profile(request, username):
"""
View a user's profile by their username.
"""
user = get_object_or_404(User, username=username)
profile = get_object_or_404(Profile, user=user)
serializer = ProfileSerializer(profile)
return Response(serializer.data, status=status.HTTP_200_OK)

0 comments on commit aa1b430

Please sign in to comment.