Skip to content

Commit

Permalink
adding missing class
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsochat@stanford.edu>
  • Loading branch information
vsoch committed Oct 27, 2020
1 parent 57aebdc commit ccc0104
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions django_oci/views/blobs.py
Expand Up @@ -31,7 +31,7 @@
from ratelimit.mixins import RatelimitMixin


class BlobDownload(APIView):
class BlobDownload(RatelimitMixin, APIView):
"""Given a GET request for a blob, stream the blob."""

ratelimit_key = "ip"
Expand Down Expand Up @@ -78,7 +78,7 @@ def delete(self, request, *args, **kwargs):
return storage.delete_blob(name, digest)


class BlobUpload(APIView):
class BlobUpload(RatelimitMixin, APIView):
"""An image push will receive a request to push, authenticate the user,
and return an upload url (url is /v2/<name>/blobs/uploads/)
"""
Expand Down
4 changes: 2 additions & 2 deletions django_oci/views/image.py
Expand Up @@ -28,7 +28,7 @@
from django_oci.auth import is_authenticated


class ImageTags(APIView, RatelimitMixin):
class ImageTags(RatelimitMixin, APIView):
"""Return a list of tags for an image."""

ratelimit_key = "ip"
Expand Down Expand Up @@ -86,7 +86,7 @@ def get(self, request, *args, **kwargs):
return Response(status=200, data=data)


class ImageManifest(APIView):
class ImageManifest(RatelimitMixin, APIView):
"""An Image Manifest holds the configuration and metadata about an image
GET: is to retrieve an existing image manifest
PUT: is to push a manifest
Expand Down

0 comments on commit ccc0104

Please sign in to comment.