mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
refactor(docker/services): convert services table to react [EE-4675] (#10289)
This commit is contained in:
parent
6b5c24faff
commit
0dc1805881
46 changed files with 969 additions and 850 deletions
19
app/react/docker/services/webhooks/getWebhooks.ts
Normal file
19
app/react/docker/services/webhooks/getWebhooks.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
import axios, { parseAxiosError } from '@/portainer/services/axios';
|
||||
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||||
|
||||
import { buildUrl } from './build-url';
|
||||
import { Webhook } from './types';
|
||||
|
||||
export async function getWebhooks(
|
||||
environmentId: EnvironmentId,
|
||||
serviceId: string
|
||||
) {
|
||||
try {
|
||||
const { data } = await axios.get<Array<Webhook>>(buildUrl(), {
|
||||
params: { filters: { EndpointID: environmentId, ResourceID: serviceId } },
|
||||
});
|
||||
return data;
|
||||
} catch (error) {
|
||||
throw parseAxiosError(error);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue