This commit is contained in:
Dominik Klarkowski
2026-06-22 11:32:27 +02:00
parent bf8624c954
commit d908965c95
16 changed files with 642 additions and 103 deletions

11
app/strength/actions.ts Normal file
View File

@@ -0,0 +1,11 @@
"use server";
import { revalidatePath } from "next/cache";
import { setStrengthWorkoutNotes } from "@/lib/models/strength";
import { getCurrentUserId } from "@/lib/session";
export async function saveStrengthNotes(workoutId: string, notes: string): Promise<void> {
const userId = await getCurrentUserId();
await setStrengthWorkoutNotes(userId, workoutId, notes);
revalidatePath(`/strength/${workoutId}`);
}