From 18149b35d0ce104bbf238138ec2eceb57965845f Mon Sep 17 00:00:00 2001 From: Moritz Bergmann Date: Thu, 14 Mar 2024 22:47:38 +0100 Subject: [PATCH] added running and biking to the avaiable sport types --- public/record.html | 2 ++ public/scripts/api/activities.js | 4 +++- src/activity.rs | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/public/record.html b/public/record.html index bfa1d5d..ba85b47 100644 --- a/public/record.html +++ b/public/record.html @@ -38,6 +38,8 @@

New Activity

diff --git a/public/scripts/api/activities.js b/public/scripts/api/activities.js index 147ea80..d4dec2f 100644 --- a/public/scripts/api/activities.js +++ b/public/scripts/api/activities.js @@ -1,7 +1,9 @@ import {BASE_ACTIVITIES_URL, STATUS, Result} from "./main.js"; export const ActivitType = { - PushUps: "PushUps" + PushUps: "PushUps", + Bicycling: "Bicycling", + Runngin: "Running", } export class Activity { diff --git a/src/activity.rs b/src/activity.rs index ba7f9bd..9d1df74 100644 --- a/src/activity.rs +++ b/src/activity.rs @@ -4,6 +4,8 @@ use sqlx::{Decode, FromRow}; #[derive(Clone, Debug, Deserialize, Serialize, sqlx::Type)] pub enum ActivityType { + Running, + Bicycling, PushUps, }