fix: retrieve the build org job state

This commit is contained in:
Ahmed Bouhuolia
2025-05-10 22:33:54 +02:00
parent 7506c2f37f
commit a42143a996
8 changed files with 79 additions and 16 deletions

View File

@@ -1,4 +1,5 @@
// @ts-nocheck
import { transformToCamelCase } from '@/utils';
import { useRequestQuery } from '../useQueryRequest';
/**
@@ -7,9 +8,9 @@ import { useRequestQuery } from '../useQueryRequest';
export function useJob(jobId, props = {}) {
return useRequestQuery(
['JOB', jobId],
{ method: 'get', url: `jobs/${jobId}` },
{ method: 'get', url: `organization/build/${jobId}` },
{
select: (res) => res.data.job,
select: (res) => transformToCamelCase(res.data),
defaultData: {},
...props,
},