adding webhook processing for strava - does not do anything useful yet
This commit is contained in:
@@ -1008,6 +1008,19 @@ def workout_stravaimport_view(request,message="",userid=0):
|
||||
|
||||
return HttpResponse(res)
|
||||
|
||||
# for Strava webhook request validation
|
||||
def strava_webhook_view(request):
|
||||
if request.method == 'GET':
|
||||
challenge = request.GET.get('hub.challenge')
|
||||
verificationtoken = request.GET.get('hub.verify_token')
|
||||
if verificationtoken != stravastuff.webhookverification:
|
||||
return HttpResponse(status=403)
|
||||
data = {"hub.challenge":challenge}
|
||||
return JSONResponse(data)
|
||||
|
||||
# POST - does nothing so far
|
||||
return HttpResponse(status=200)
|
||||
|
||||
# For push notifications from Garmin
|
||||
@csrf_exempt
|
||||
def garmin_summaries_view(request):
|
||||
|
||||
Reference in New Issue
Block a user