mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-16 02:09:44 +00:00
17 lines
490 B
TypeScript
17 lines
490 B
TypeScript
import { EntityWorkflow } from "ChillMainAssets/types";
|
|
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
|
|
|
export const fetchWorkflow = async (
|
|
workflowId: number,
|
|
): Promise<EntityWorkflow> => {
|
|
try {
|
|
return await makeFetch<null, EntityWorkflow>(
|
|
"GET",
|
|
`/api/1.0/main/workflow/${workflowId}.json`,
|
|
);
|
|
} catch (error) {
|
|
console.error(`Failed to fetch workflow ${workflowId}:`, error);
|
|
throw error;
|
|
}
|
|
};
|