16 lines
420 B
TypeScript
16 lines
420 B
TypeScript
|
|
import apiService from '@/services/api.service'
|
||
|
|
import { AxiosError } from 'axios'
|
||
|
|
|
||
|
|
export const generateBackgroundWorkers = async () => {
|
||
|
|
try {
|
||
|
|
return await apiService.fetchData<void, Record<string, string>>({
|
||
|
|
method: 'POST',
|
||
|
|
url: '/api/app/background-worker/generate-background-workers',
|
||
|
|
})
|
||
|
|
} catch (error) {
|
||
|
|
if (error instanceof AxiosError) {
|
||
|
|
return error.response?.data
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|