def _unshare(self):
content = self.get_object()
try:
content.unshare(self.request.user.profile)
except ValidationError as e:
raise exceptions.ValidationError(e.message)
except Exception:
raise exceptions.APIException("Unknown error when creating share.")
return Response({"status": "ok"}, status=HTTP_204_NO_CONTENT)
评论列表
文章目录