bike erg import from C2 log
This commit is contained in:
@@ -89,7 +89,12 @@ def handle_c2_import_stroke_data(c2token,
|
||||
c2id,workoutid,
|
||||
starttimeunix,
|
||||
csvfilename,debug=True,**kwargs):
|
||||
|
||||
|
||||
if 'workouttype' in kwargs:
|
||||
workouttype = kwargs['workouttype']
|
||||
else:
|
||||
workouttype = 'rower'
|
||||
|
||||
authorizationstring = str('Bearer ' + c2token)
|
||||
headers = {'Authorization': authorizationstring,
|
||||
'user-agent': 'sanderroosendaal',
|
||||
@@ -100,7 +105,7 @@ def handle_c2_import_stroke_data(c2token,
|
||||
strokedata = pd.DataFrame.from_dict(s.json()['data'])
|
||||
result = add_c2_stroke_data_db(
|
||||
strokedata,workoutid,starttimeunix,
|
||||
csvfilename,debug=debug,
|
||||
csvfilename,debug=debug,workouttype=workouttype
|
||||
)
|
||||
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user