mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
Fix TypeScript errors in useSchedules hook mutation callbacks
This commit is contained in:
1 parent
6a0402d93a
commit
6cb5e59169
1 file changed
+5
-5
@@ -102,9 +102,9 @@ export function useUpdateRepoSchedule(repoId: number | undefined) {
|
||||
const response = await updateRepoSchedule(resolvedRepoId!, jobId, data)
|
||||
return response.job
|
||||
},
|
||||
onSuccess: (__variables) => {
|
||||
queryClient.invalidateQueries({ queryKey: ['repo-schedules', __variables.repoId ?? repoId] })
|
||||
queryClient.invalidateQueries({ queryKey: ['repo-schedule', __variables.repoId ?? repoId, __variables.jobId] })
|
||||
onSuccess: (_data, variables) => {
|
||||
queryClient.invalidateQueries({ queryKey: ['repo-schedules', variables.repoId ?? repoId] })
|
||||
queryClient.invalidateQueries({ queryKey: ['repo-schedule', variables.repoId ?? repoId, variables.jobId] })
|
||||
queryClient.invalidateQueries({ queryKey: ['all-schedules'] })
|
||||
showToast.success('Schedule updated')
|
||||
},
|
||||
@@ -122,8 +122,8 @@ export function useDeleteRepoSchedule(repoId: number | undefined) {
|
||||
const resolvedRepoId = callRepoId ?? repoId
|
||||
return deleteRepoSchedule(resolvedRepoId!, jobId)
|
||||
},
|
||||
onSuccess: (__variables) => {
|
||||
queryClient.invalidateQueries({ queryKey: ['repo-schedules', __variables.repoId ?? repoId] })
|
||||
onSuccess: (_data, variables) => {
|
||||
queryClient.invalidateQueries({ queryKey: ['repo-schedules', variables.repoId ?? repoId] })
|
||||
queryClient.invalidateQueries({ queryKey: ['all-schedules'] })
|
||||
showToast.success('Schedule deleted')
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user