true message
This commit is contained in:
@@ -372,10 +372,8 @@ 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(["daily", "weekly", "monthly", "interval", "scheduled"]).optional(),
|
||||
fetch_mode: z.enum(["scheduled", "interval"]).optional(),
|
||||
fetch_interval_minutes: z.string().optional(),
|
||||
fetch_week_day: z.string().optional(),
|
||||
fetch_month_day: z.string().optional(),
|
||||
})
|
||||
)
|
||||
.mutation(async ({ input }) => {
|
||||
@@ -385,7 +383,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 || toSave.fetch_week_day || toSave.fetch_month_day) {
|
||||
if (toSave.import_time || toSave.fetch_mode || toSave.fetch_interval_minutes) {
|
||||
await scheduleDailyImport();
|
||||
}
|
||||
return { success: true };
|
||||
|
||||
Reference in New Issue
Block a user