apilogging
This commit is contained in:
@@ -554,6 +554,7 @@ def strokedata_fit(request):
|
||||
return HttpResponseBadRequest("Only POST requests are allowed.")
|
||||
|
||||
|
||||
dologgin('apilog.log', request.user.username+" (strokedata_fit POST)"
|
||||
try:
|
||||
fit_data = request.data
|
||||
|
||||
@@ -578,7 +579,8 @@ def strokedata_fit(request):
|
||||
try:
|
||||
# Parse the FIT file
|
||||
try:
|
||||
row = FP(fit_filename)
|
||||
row = FP(fit_filename)
|
||||
dologging('apilog.log','FIT file parsed')
|
||||
except ValueError as e:
|
||||
dologging('apilog.log','FIT error')
|
||||
dologging('apilog.log',e)
|
||||
@@ -629,6 +631,7 @@ def strokedata_fit(request):
|
||||
url,
|
||||
uploadoptions)
|
||||
|
||||
dologging('apilog.log','FIT file uploaded, returning response')
|
||||
return JsonResponse(
|
||||
{"status": "success",
|
||||
"workout public id": encoder.encode_hex(w.id),
|
||||
|
||||
Reference in New Issue
Block a user