fix: Update URL path regex in StatsViewSet for username counts action

This commit is contained in:
Sean Morley
2025-02-25 10:55:08 -05:00
parent 00e4ec64ae
commit 3e0639e6f7

View File

@@ -14,7 +14,7 @@ class StatsViewSet(viewsets.ViewSet):
"""
A simple ViewSet for listing the stats of a user.
"""
@action(detail=False, methods=['get'], url_path='counts/(?P<username>[^/.]+)')
@action(detail=False, methods=['get'], url_path='counts/(?P<username>[^/]+)')
def counts(self, request, username):
if request.user.username == username:
user = get_object_or_404(User, username=username)