Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

So let it be written, so let it be CORSed

Ratings APIs need to be CORSed.
  • Loading branch information...
commit 6d51aa207d69764e56e68df1bbb8fde0f39eb987 1 parent 3fede31
@mattbasta mattbasta authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 mkt/ratings/resources.py
View
6 mkt/ratings/resources.py
@@ -17,7 +17,7 @@
PermissionAuthorization,
SharedSecretAuthentication)
from mkt.api.authorization import AnonymousReadOnlyAuthorization
-from mkt.api.base import MarketplaceModelResource
+from mkt.api.base import CORSResource, MarketplaceModelResource
from mkt.api.resources import AppResource, UserResource
from mkt.ratings.forms import ReviewForm
from mkt.webapps.models import Webapp
@@ -26,7 +26,7 @@
log = commonware.log.getLogger('z.api')
-class RatingResource(MarketplaceModelResource):
+class RatingResource(CORSResource, MarketplaceModelResource):
app = fields.ToOneField(AppResource, 'addon', readonly=True)
user = fields.ToOneField(UserResource, 'user', readonly=True, full=True)
@@ -201,7 +201,7 @@ def post_flag(self, request, **kwargs):
review_id=kwargs['review_id'])
-class RatingFlagResource(MarketplaceModelResource):
+class RatingFlagResource(CORSResource, MarketplaceModelResource):
class Meta:
queryset = ReviewFlag.objects.all()
Please sign in to comment.
Something went wrong with that request. Please try again.