Skip to content

Commit

Permalink
adding running and biking to the avaiable sport types (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
mobergmann authored Mar 14, 2024
1 parent c2e9f7b commit c0b7379
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions public/record.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ <h1>New Activity</h1>
<div class="input-group">
<i class="fa-solid fa-person-walking"></i>
<select id="activity_type" class="input">
<option value="Running">Running</option>
<option value="Bicycling">Bicycling</option>
<option value="PushUps">Push-Ups</option>
</select>
</div>
Expand Down
4 changes: 3 additions & 1 deletion public/scripts/api/activities.js
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions src/activity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ use sqlx::{Decode, FromRow};

#[derive(Clone, Debug, Deserialize, Serialize, sqlx::Type)]
pub enum ActivityType {
Running,
Bicycling,
PushUps,
}

Expand Down

0 comments on commit c0b7379

Please sign in to comment.