Checkpoint: Rétablissement des modes Quotidienne, Hebdomadaire (choix du jour), Mensuelle (choix du jour du mois) et Intervalle dans la section Planification des Paramètres. Ajout de fetch_day_of_week et fetch_day_of_month dans le schéma Zod du backend.
This commit is contained in:
@@ -372,8 +372,10 @@ export const appRouter = router({
|
||||
sharepoint_token: z.string().optional(),
|
||||
auth_mode: z.enum(["local", "free"]).optional(),
|
||||
import_time: z.string().optional(),
|
||||
fetch_mode: z.enum(["scheduled", "interval"]).optional(),
|
||||
fetch_mode: z.enum(["scheduled", "weekly", "monthly", "interval"]).optional(),
|
||||
fetch_interval_minutes: z.string().optional(),
|
||||
fetch_day_of_week: z.string().optional(),
|
||||
fetch_day_of_month: z.string().optional(),
|
||||
})
|
||||
)
|
||||
.mutation(async ({ input }) => {
|
||||
@@ -383,7 +385,7 @@ export const appRouter = router({
|
||||
}
|
||||
await setSettings(toSave);
|
||||
// Recharger le cron si la planification a changé
|
||||
if (toSave.import_time || toSave.fetch_mode || toSave.fetch_interval_minutes) {
|
||||
if (toSave.import_time || toSave.fetch_mode || toSave.fetch_interval_minutes || toSave.fetch_day_of_week || toSave.fetch_day_of_month) {
|
||||
await scheduleDailyImport();
|
||||
}
|
||||
return { success: true };
|
||||
|
||||
Reference in New Issue
Block a user