store/cockpitApi: fix deleting blueprints

This commit is contained in:
Sanne Raymaekers 2025-02-04 16:47:42 +01:00 committed by Klara Simickova
parent 52a43b0f2d
commit 8dd85a3c1e
2 changed files with 2 additions and 2 deletions

View file

@ -277,7 +277,7 @@ export const cockpitApi = contentSourcesApi.injectEndpoints({
const blueprintsDir = await getBlueprintsPath();
const filepath = path.join(blueprintsDir, filename);
await cockpit.spawn(['rm', filepath], {
await cockpit.spawn(['rm', '-r', filepath], {
superuser: 'try',
});

View file

@ -19,7 +19,7 @@ const enhancedApi = cockpitApi.enhanceEndpoints({
invalidatesTags: [{ type: 'Blueprints' }],
},
deleteBlueprint: {
invalidatesTags: [{ type: 'Blueprints' }],
invalidatesTags: [{ type: 'Blueprints' }, { type: 'Composes' }],
onQueryStarted: async (_, { dispatch, queryFulfilled }) => {
queryFulfilled
.then(() => {