test deregistrations
This commit is contained in:
@@ -1024,7 +1024,22 @@ def garmin_summaries_view(request):
|
||||
|
||||
return HttpResponse(status=400)
|
||||
|
||||
@csrf_exempt
|
||||
@csrf_exempt
|
||||
def garmin_deregistration_view(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404("not allowed")
|
||||
|
||||
data = json.loads(request.body)
|
||||
garmintoken = data['userAccessToken']
|
||||
try:
|
||||
r = Rower.objects.get(garmintoken=garmintoken)
|
||||
r.garmintoken = ''
|
||||
except Rower.DoesNotExist:
|
||||
raise HttpResponseNotFound("Not found")
|
||||
|
||||
return HttpResponse(status=200)
|
||||
|
||||
@csrf_exempt
|
||||
def garmin_details_view(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404("not allowed")
|
||||
|
||||
Reference in New Issue
Block a user