fix bug product view
This commit is contained in:
@@ -24,7 +24,7 @@ class ProductView(APIView):
|
|||||||
def get(self, request, pk):
|
def get(self, request, pk):
|
||||||
product = get_object_or_404(ProductModel, id=pk)
|
product = get_object_or_404(ProductModel, id=pk)
|
||||||
product_ser = self.serializer_class(instance=product, many=False)
|
product_ser = self.serializer_class(instance=product, many=False)
|
||||||
return Response({product_ser.data}, status=status.HTTP_200_OK)
|
return Response(product_ser.data, status=status.HTTP_200_OK)
|
||||||
|
|
||||||
class AllProductsView(APIView):
|
class AllProductsView(APIView):
|
||||||
serializer_class = ProductSerializer
|
serializer_class = ProductSerializer
|
||||||
|
|||||||
Reference in New Issue
Block a user