Example #1
0
    def retrieve(self, request, pk=None):
        key = view_utils.get_key(self.keys, self.request.user)

        result = self.adapter().get(
            request,
            self.provider().get(pk, key)
        )
        return Response(result)
Example #2
0
    def retrieve(self, request, pk=None, params=None):
        result = self.adapter().get(request, self.provider().get(pk, self.key.objects.get(owner=self.request.user)))

        key = view_utils.get_key(self.keys, self.request.user)

        result = self.adapter().list(
            request,
            params,
            self.provider().list(params, key)
        )
        return Response(result)