From 760a61001edafb462ca9c7f5bc8013f31fb15a5c Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Fri, 25 Sep 2026 09:10:31 +0200 Subject: Compress comments to terse single lines within line width --- src/lib/server/services/routine-actions.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/lib/server/services/routine-actions.ts') diff --git a/src/lib/server/services/routine-actions.ts b/src/lib/server/services/routine-actions.ts index 64d0a1b..28a25cc 100644 --- a/src/lib/server/services/routine-actions.ts +++ b/src/lib/server/services/routine-actions.ts @@ -2,13 +2,7 @@ import { fail, type ActionFailure } from '@sveltejs/kit'; import { archive, complete, edit, loadCurrent } from './routines'; import { parseFormString, parseFrequencyDays } from './validation'; -/** - * Shared implementations of the routine edit/complete form actions, used by - * both the project dashboard (/projects/[id]) and the routine page - * (/projects/[projectId]/routine/[routineId]). Guarding and failure messages - * are the strictest common denominator: a missing or archived routine is - * rejected before any write. - */ +/** Shared routine edit/complete actions; rejects missing/archived routines. */ export type EditRoutineResult = ActionFailure<{ error: string }> | { success: boolean; type?: 'edit' }; @@ -38,8 +32,7 @@ export async function editRoutineAction( return fail(400, { error: 'Fréquence invalide' }); } - // The dashboard row form has no description field; only touch it when the - // form actually sends one, so list edits never wipe a description. + // Only touch description when the form sends one; list edits never wipe it. const fields: { name: string; frequencyDays: number; description?: string } = { name, frequencyDays }; const description = data.get('description'); -- cgit v1.3