mirror of
https://github.com/joaovitoriasilva/endurain.git
synced 2026-01-10 08:17:59 -05:00
Strava refresh token failing + walk activities not properly tagged
[backend] fixed Strava refresh token failing [backend] fixed walk activities not properly tagged [frontend]fixed walk activities not properly tagged
This commit is contained in:
@@ -244,8 +244,9 @@ def define_activity_type(activity_type):
|
||||
"virtual_ride": 7,
|
||||
"Swim": 8,
|
||||
"swimming": 8,
|
||||
"open_water_swimming": 8,
|
||||
"Walk": 9,
|
||||
"open_water_swimming": 9,
|
||||
"Walk": 11,
|
||||
"Hike": 12,
|
||||
}
|
||||
# "AlpineSki",
|
||||
# "BackcountrySki",
|
||||
|
||||
@@ -32,9 +32,12 @@ def refresh_strava_tokens(db: Session):
|
||||
|
||||
# Check if user_integrations strava token is not None
|
||||
if user_integrations.strava_token is not None:
|
||||
refresh_time = user_integrations.strava_token_expires_at - timedelta(
|
||||
minutes=60
|
||||
)
|
||||
# refresh_time = user_integrations.strava_token_expires_at - timedelta(
|
||||
# minutes=60
|
||||
# )
|
||||
refresh_time = user_integrations.strava_token_expires_at.replace(
|
||||
tzinfo=timezone.utc
|
||||
) - timedelta(minutes=60)
|
||||
|
||||
if datetime.now(timezone.utc) > refresh_time:
|
||||
# Strava token refresh endpoint
|
||||
|
||||
@@ -45,6 +45,12 @@
|
||||
<span v-else-if="activity.activity_type == 8 || activity.activity_type == 9">
|
||||
<font-awesome-icon :icon="['fas', 'fa-person-swimming']" />
|
||||
</span>
|
||||
<span v-else-if="activity.activity_type == 11">
|
||||
<font-awesome-icon :icon="['fas', 'person-walking']" />
|
||||
</span>
|
||||
<span v-else-if="activity.activity_type == 12">
|
||||
<font-awesome-icon :icon="['fas', 'person-hiking']" />
|
||||
</span>
|
||||
<span v-else>
|
||||
<font-awesome-icon :icon="['fas', 'fa-dumbbell']" />
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user