1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-08-05 13:15:18 +02:00

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)