store/cockpitApi: correct getBlueprint's cache tags
After editing a blueprint, the blueprint needs to be invalidated.
This commit is contained in:
parent
c0187f7b76
commit
b91981c17c
1 changed files with 7 additions and 2 deletions
|
|
@ -3,8 +3,13 @@ import { addNotification } from '@redhat-cloud-services/frontend-components-noti
|
|||
import { cockpitApi } from './cockpitApi';
|
||||
|
||||
const enhancedApi = cockpitApi.enhanceEndpoints({
|
||||
addTagTypes: ['Blueprints', 'Composes'],
|
||||
addTagTypes: ['Blueprint', 'Blueprints', 'Composes'],
|
||||
endpoints: {
|
||||
getBlueprint: {
|
||||
providesTags: () => {
|
||||
return [{ type: 'Blueprint' }];
|
||||
},
|
||||
},
|
||||
getBlueprints: {
|
||||
providesTags: () => {
|
||||
return [{ type: 'Blueprints' }];
|
||||
|
|
@ -34,7 +39,7 @@ const enhancedApi = cockpitApi.enhanceEndpoints({
|
|||
},
|
||||
},
|
||||
updateBlueprint: {
|
||||
invalidatesTags: [{ type: 'Blueprints' }],
|
||||
invalidatesTags: [{ type: 'Blueprint' }, { type: 'Blueprints' }],
|
||||
onQueryStarted: async (_, { dispatch, queryFulfilled }) => {
|
||||
queryFulfilled
|
||||
.then(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue