-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed commit of the following: commit 25e3a175320933f71d06424ce01076acc3497071 Author: Ethan Swan <[email protected]> Date: Mon Sep 4 12:46:09 2023 -0500 Make dark theme darker. commit 9ae5ae39477c99cdd5077796cae5b1f93617924a Author: Ethan Swan <[email protected]> Date: Mon Sep 4 12:37:43 2023 -0500 Add details to workout cards. commit fe2a21820a2a7304440ceb4e336497aa70d4ca3e Author: Ethan Swan <[email protected]> Date: Mon Sep 4 12:32:14 2023 -0500 Add details to recent workout cards. commit f034e98a2d5eee80387fac06c42e7797a12580fc Author: Ethan Swan <[email protected]> Date: Mon Sep 4 11:37:55 2023 -0500 Run prettier.
- Loading branch information
Showing
11 changed files
with
119 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export { createExercise, createExercises } from "./create"; | ||
export { getExercisesByWorkoutId } from "./get"; | ||
export { getExercisesByWorkoutId } from "./read"; | ||
export { overwriteExercise } from "./update"; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export { createWorkout } from "./create"; | ||
export { getWorkoutById, getAllWorkouts } from "./read"; | ||
export { updateWorkout } from "./update"; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
"use server"; | ||
|
||
import { patch } from "@/lib/requests"; | ||
import { Workout } from "@/lib/resources/apiTypes"; | ||
|
||
const ROUTE = "/workouts/"; | ||
|
||
type UpdateWorkoutParams = { | ||
workoutId: string; | ||
fields: Partial<Workout>; | ||
}; | ||
|
||
export async function updateWorkout({ | ||
workoutId, | ||
fields, | ||
}: UpdateWorkoutParams): Promise<Workout> { | ||
return (await patch({ | ||
route: `${ROUTE}`, | ||
id: workoutId, | ||
body: JSON.stringify(fields), | ||
})) as Workout; | ||
} |