Skip to content

Commit

Permalink
Specify serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
danniel committed Oct 11, 2023
1 parent c13a8d9 commit 6e48c8b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/buildings/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,13 @@ class WorkPerformedViewSet(viewsets.ReadOnlyModelViewSet):
serializer_class = WorkPerformedSerializer


@extend_schema(
request=StatisticSerializer,
responses=None # TODO: is it really None?
)
@api_view(["GET"])
@permission_classes((permissions.AllowAny,))
def statistics(self):
def statistics(request):
stats = Statistic.get_statistic()
serializer = StatisticSerializer(stats, many=False)

Expand Down

0 comments on commit 6e48c8b

Please sign in to comment.