diff --git a/api/views/api.py b/api/views/api.py index 5bb7a938..ee0088e6 100644 --- a/api/views/api.py +++ b/api/views/api.py @@ -30,13 +30,13 @@ class CounterViewSet(viewsets.ModelViewSet): @list_route() def bar(self, request): """ - Return all counters (api/v1/counter/all) + Return all counters (api/v1/counter/bar) """ self.queryset = Counter.objects.filter(type="BAR") serializer = self.get_serializer(self.queryset, many=True) return Response(serializer.data) - @detail_route(methods=['GET']) + @detail_route() def id(self, request, pk=None): """ Get by id (api/v1/{nk}/id)