Files
knur-app/app/strength/actions.ts

12 lines
415 B
TypeScript
Raw Normal View History

2026-06-22 11:32:27 +02:00
"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}`);
}