mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 16:17:13 +01:00
Fixed mutate queries.
This commit is contained in:
parent
e462a55ab9
commit
a4f8ab6ad9
4 changed files with 20 additions and 14 deletions
|
|
@ -12,12 +12,12 @@ export function ReportHeader({ icon }) {
|
|||
const { showToast } = useToasts();
|
||||
const { post, useMutation } = useApi();
|
||||
const router = useRouter();
|
||||
const { mutate: create, isLoading: isCreating } = useMutation((data: any) =>
|
||||
post(`/reports`, data),
|
||||
);
|
||||
const { mutate: update, isLoading: isUpdating } = useMutation((data: any) =>
|
||||
post(`/reports/${data.id}`, data),
|
||||
);
|
||||
const { mutate: create, isPending: isCreating } = useMutation({
|
||||
mutationFn: (data: any) => post(`/reports`, data),
|
||||
});
|
||||
const { mutate: update, isPending: isUpdating } = useMutation({
|
||||
mutationFn: (data: any) => post(`/reports/${data.id}`, data),
|
||||
});
|
||||
|
||||
const { name, description, parameters } = report || {};
|
||||
const { websiteId, dateRange } = parameters || {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue