feat(server): add RSS feed fetching functionality and enhance workflow management
- Introduced a new script for fetching RSS feeds, allowing workflows to process and transform feed data using JSONata. - Updated workflow configuration to include a new RSS feed script, enhancing the capabilities of existing workflows. - Enhanced the workflow management API to support enabling and disabling workflows dynamically. - Improved UI components to reflect the new workflow features, including enabling/disabling workflows and displaying their statuses. - Added support for wildcard filtering in workflow queries, improving the flexibility of workflow management.
This commit is contained in:
@@ -164,6 +164,24 @@ export function useSaveWorkflow() {
|
||||
});
|
||||
}
|
||||
|
||||
export function useSetWorkflowEnabled() {
|
||||
const qc = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: async ({ owner, file, enabled }) =>
|
||||
(
|
||||
await api.patch(
|
||||
`/workflows/${encodeURIComponent(owner)}/${encodeURIComponent(file)}`,
|
||||
{ enabled },
|
||||
)
|
||||
).data,
|
||||
onSuccess: (_data, vars) => {
|
||||
qc.invalidateQueries({ queryKey: ["workflows"] });
|
||||
qc.invalidateQueries({ queryKey: ["workflows", vars.owner, vars.file] });
|
||||
qc.invalidateQueries({ queryKey: ["dashboard"] });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export function useDeleteWorkflow() {
|
||||
const qc = useQueryClient();
|
||||
return useMutation({
|
||||
|
||||
Reference in New Issue
Block a user