Skip to content

Commit

Permalink
fix: add agent to invalidate queries on restore backup (#704)
Browse files Browse the repository at this point in the history
  • Loading branch information
avivm authored Jul 18, 2023
1 parent 1ca2648 commit 54d9ebc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/renderer/apis/requests/backup/importBackup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { crudKeys } from '../crud/crudKeys';
import { instanceCrudEntity } from '../crud/entity/entities/instance.crudEntity';
import { applicationCrudEntity } from '../crud/entity/entities/application.crudEntity';
import { folderCrudEntity } from '../crud/entity/entities/folder.crudEntity';
import { agentCrudEntity } from 'renderer/apis/requests/crud/entity/entities/agent.crudEntity';

type Variables = {
jsonData: string;
Expand All @@ -34,6 +35,7 @@ export const useImportBackup = (
invalidateQueriesKeysFn: (data, variables) => [
crudKeys.entity(instanceCrudEntity),
crudKeys.entity(applicationCrudEntity),
crudKeys.entity(agentCrudEntity),
crudKeys.entity(folderCrudEntity),
],
});
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { crudKeys } from 'renderer/apis/requests/crud/crudKeys';
import { instanceCrudEntity } from 'renderer/apis/requests/crud/entity/entities/instance.crudEntity';
import { applicationCrudEntity } from 'renderer/apis/requests/crud/entity/entities/application.crudEntity';
import { folderCrudEntity } from 'renderer/apis/requests/crud/entity/entities/folder.crudEntity';
import { agentCrudEntity } from 'renderer/apis/requests/crud/entity/entities/agent.crudEntity';

type Variables = {
fileName: string;
Expand All @@ -34,6 +35,7 @@ export const useRestoreSystemBackup = (
invalidateQueriesKeysFn: (data, variables) => [
crudKeys.entity(instanceCrudEntity),
crudKeys.entity(applicationCrudEntity),
crudKeys.entity(agentCrudEntity),
crudKeys.entity(folderCrudEntity),
],
});

0 comments on commit 54d9ebc

Please sign in to comment.