chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:08:39 +08:00
commit a0df89c693
5252 changed files with 523444 additions and 0 deletions
@@ -0,0 +1,30 @@
import { useMutation } from '@tanstack/react-query';
import axios, { parseAxiosError } from '@/portainer/services/axios/axios';
import { buildStackUrl } from '@/react/common/stacks/queries/buildUrl';
import { Stack } from '@/react/common/stacks/types';
export function useStopStackMutation() {
return useMutation({
mutationFn: stopStack,
});
}
async function stopStack({
id,
environmentId,
}: {
id: Stack['Id'];
environmentId?: number;
}) {
try {
const { data } = await axios.post<Stack>(
buildStackUrl(id, 'stop'),
undefined,
{ params: { endpointId: environmentId } }
);
return data;
} catch (e) {
throw parseAxiosError(e, 'Unable to stop stack');
}
}