uncloud-mravi/uncloud/ungleich_service/views.py

18 lines
576 B
Python
Raw Normal View History

from rest_framework import viewsets, permissions
from .models import MatrixServiceProduct
from .serializers import MatrixServiceProductSerializer
from uncloud_pay.helpers import ProductViewSet
class MatrixServiceProductViewSet(ProductViewSet):
permission_classes = [permissions.IsAuthenticated]
serializer_class = MatrixServiceProductSerializer
def get_queryset(self):
return MatrixServiceProduct.objects.filter(owner=self.request.user)
def create(self, request):
2020-02-29 08:08:30 +00:00
# TODO: create order, register service
return Response('{"HIT!"}')