feat: Add exercise details to API response
The code changes include adding the `exerciseId`, `shortDescription`, `path`, and `duration` fields to the API response for exercises. This provides more comprehensive information about each exercise to the client. Note: The recent user commits and repository commits are not relevant for generating the commit message.
This commit is contained in:
@@ -32,11 +32,15 @@ function handleIncoming(request, response, app, pool)
|
|||||||
// Send back the data in the right format
|
// Send back the data in the right format
|
||||||
let converted = rows.map(row => {
|
let converted = rows.map(row => {
|
||||||
return {
|
return {
|
||||||
|
exerciseId: row.ExerciseID,
|
||||||
name: row.Name,
|
name: row.Name,
|
||||||
description: row.Description,
|
|
||||||
muscleGroup: row.MuscleGroup,
|
muscleGroup: row.MuscleGroup,
|
||||||
|
shortDescription: row.ShortDescription,
|
||||||
|
description: row.Description,
|
||||||
imageUrl: row.ImageURL,
|
imageUrl: row.ImageURL,
|
||||||
videoUrl: row.VideoURL
|
videoUrl: row.VideoURL,
|
||||||
|
path: row.Path,
|
||||||
|
duration: row.Duration
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -45,7 +45,7 @@ tools:openDrawer="start">
|
|||||||
android:layout_width="150dp"
|
android:layout_width="150dp"
|
||||||
android:layout_height="75dp"
|
android:layout_height="75dp"
|
||||||
android:layout_marginStart="404dp"
|
android:layout_marginStart="404dp"
|
||||||
android:layout_marginBottom="30dp"
|
android:layout_marginBottom="0dp"
|
||||||
android:background="@drawable/red_button_gradient"
|
android:background="@drawable/red_button_gradient"
|
||||||
android:drawableTop="@drawable/ic_baseline_home_48"
|
android:drawableTop="@drawable/ic_baseline_home_48"
|
||||||
android:drawableTint="@color/white"
|
android:drawableTint="@color/white"
|
||||||
|
Reference in New Issue
Block a user