Permalink
Browse files

api: fix csrf_exempt decorator order.

  • Loading branch information...
1 parent 47552eb commit 31aaa04759e6234a11e6acb8dabbb81292e1e64b @mik3y mik3y committed Jan 29, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 pykeg/src/pykeg/web/api/views.py
@@ -221,8 +221,8 @@ def get_drink(request, drink_id):
drink = get_object_or_404(models.Drink, seqn=drink_id, site=request.kbsite)
return protoutil.ProtoMessageToDict(protolib.GetDrinkDetail(drink))
-@py_to_json
@csrf_exempt
+@py_to_json
@auth_required
def add_drink_photo(request, drink_id):
if request.method != 'POST':
@@ -523,8 +523,8 @@ def _tap_detail_post(request, tap):
except backend.BackendError, e:
raise krest.ServerError(str(e))
-@py_to_json
@csrf_exempt
+@py_to_json
@auth_required
def cancel_drink(request):
#if request.method != 'POST':
@@ -541,8 +541,8 @@ def cancel_drink(request):
except backend.BackendError, e:
raise krest.ServerError(str(e))
-@py_to_json
@csrf_exempt
+@py_to_json
def login(request):
if request.POST:
form = AuthenticationForm(data=request.POST)
@@ -571,8 +571,8 @@ def send(self, **kwargs):
from sentry.models import GroupedMessage
return GroupedMessage.objects.from_kwargs(**kwargs)
-@py_to_json
@csrf_exempt
+@py_to_json
@auth_required
def debug_log(request):
if request.method != 'POST':

0 comments on commit 31aaa04

Please sign in to comment.