feat: unify cron delivery account and target selection (#642)

This commit is contained in:
cedric
2026-03-25 10:12:49 +08:00
committed by GitHub
Unverified
parent 9aea3c9441
commit 9d40e1fa05
20 changed files with 2073 additions and 88 deletions

View File

@@ -53,13 +53,13 @@ export const useCronStore = create<CronState>((set) => ({
updateJob: async (id, input) => {
try {
await hostApiFetch(`/api/cron/jobs/${encodeURIComponent(id)}`, {
const updatedJob = await hostApiFetch<CronJob>(`/api/cron/jobs/${encodeURIComponent(id)}`, {
method: 'PUT',
body: JSON.stringify(input),
});
set((state) => ({
jobs: state.jobs.map((job) =>
job.id === id ? { ...job, ...input, updatedAt: new Date().toISOString() } : job
job.id === id ? updatedJob : job
),
}));
} catch (error) {