Cwiczenia: usuniecie martwego pola trudnosc z katalogu (trudnosc pozostaje tylko jako ocena cwiczacego per seria 1-5; migracja DROP kolumny Exercise.difficulty)
This commit is contained in:
@@ -9,7 +9,6 @@ export interface ExerciseInput {
|
||||
description?: string | null;
|
||||
howTo?: string | null;
|
||||
commonMistakes?: string | null;
|
||||
difficulty?: number;
|
||||
/** Equipment ids to link (replaces the current set when provided). */
|
||||
equipmentIds?: string[];
|
||||
hasReps?: boolean;
|
||||
@@ -86,7 +85,6 @@ export async function createExercise(prisma: PrismaClient, data: ExerciseInput)
|
||||
description: data.description ?? null,
|
||||
howTo: data.howTo ?? null,
|
||||
commonMistakes: data.commonMistakes ?? null,
|
||||
difficulty: data.difficulty ?? 3,
|
||||
source: 'BUILTIN',
|
||||
// undefined → Prisma default (has* pozostają przy domyślnych kombinacjach)
|
||||
hasReps: data.hasReps,
|
||||
@@ -125,7 +123,6 @@ export async function updateExercise(
|
||||
description: data.description,
|
||||
howTo: data.howTo,
|
||||
commonMistakes: data.commonMistakes,
|
||||
difficulty: data.difficulty,
|
||||
hasReps: data.hasReps,
|
||||
hasLoad: data.hasLoad,
|
||||
hasRest: data.hasRest,
|
||||
|
||||
Reference in New Issue
Block a user