UNLV-CS472-672 / 2024-S-GROUP3-Barbell

A workout-tracking app with a support website that does more than just track workouts. Cross platform in IOS and Android
4 stars 0 forks source link

195 frontend workout log api end points #227

Closed BitsyBirb closed 5 months ago

BitsyBirb commented 5 months ago

What type of PR is this? (Check all that apply)

Description

What did you change? How did you change it?

I added router endpoints for the WorkoutLog model of our schema including: A creation function that allows us to create workout logs An update function that allows us to update a log based on the provided log id (not userID) A single query function that will return a single workout log based on the provided log id (not userID) A multiple query function that will return all workout logs for the provided userID (not log id) in ascending order off dates.

Tests

How was this tested?

[Optional] Screenshots

Database before creating a new workout log: image

Successful queries using single and multiple query functions: image

Database after creating a new workout log: image

Database after updating newly created log: image

Documentation

Link to external documentation:

[Optional] Are there any post-deployment tasks we need to perform?

There was just one thing I noticed that I wasn't too sure about; when I create a new workout log, the duration was 3660 as opposed to the passed value of 0 that I gave it. This could just be a local thing, but worth looking into.

thienguen commented 5 months ago

unfortunate, this will dropped