mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
add mutation for unpublishing
This commit is contained in:
committed by
psychedelicious
parent
1558fe9a37
commit
2da8ac216b
@@ -148,6 +148,13 @@ export const workflowsApi = api.injectEndpoints({
|
||||
}),
|
||||
invalidatesTags: (result, error, workflow_id) => [{ type: 'Workflow', id: workflow_id }],
|
||||
}),
|
||||
unpublishWorkflow: build.mutation<void, string>({
|
||||
query: (workflow_id) => ({
|
||||
url: buildWorkflowsUrl(`i/${workflow_id}/unpublish`),
|
||||
method: 'POST',
|
||||
}),
|
||||
invalidatesTags: (result, error, workflow_id) => [{ type: 'Workflow', id: workflow_id }],
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -163,4 +170,5 @@ export const {
|
||||
useListWorkflowsInfiniteInfiniteQuery,
|
||||
useSetWorkflowThumbnailMutation,
|
||||
useDeleteWorkflowThumbnailMutation,
|
||||
useUnpublishWorkflowMutation,
|
||||
} = workflowsApi;
|
||||
|
||||
Reference in New Issue
Block a user