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