Files
knur-app/app/strength/actions.ts
Dominik Klarkowski d908965c95 init
2026-06-22 11:32:27 +02:00

12 lines
415 B
TypeScript

"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}`);
}