mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 14:17:13 +01:00
Fixed share url save.
This commit is contained in:
parent
b3f8bbe3fc
commit
7d952029c1
3 changed files with 8 additions and 4 deletions
|
|
@ -35,7 +35,11 @@ export function ShareUrl({ hostUrl, onSave }: { hostUrl?: string; onSave?: () =>
|
|||
};
|
||||
|
||||
const handleCheck = (checked: boolean) => {
|
||||
const data = { name: website.name, shareId: checked ? generateId() : null };
|
||||
const data = {
|
||||
name: website.name,
|
||||
domain: website.domain,
|
||||
shareId: checked ? generateId() : null,
|
||||
};
|
||||
mutate(data, {
|
||||
onSuccess: async () => {
|
||||
touch(`website:${website.id}`);
|
||||
|
|
@ -47,7 +51,7 @@ export function ShareUrl({ hostUrl, onSave }: { hostUrl?: string; onSave?: () =>
|
|||
|
||||
const handleSave = () => {
|
||||
mutate(
|
||||
{ shareId: id },
|
||||
{ name: website.name, domain: website.domain, shareId: id },
|
||||
{
|
||||
onSuccess: async () => {
|
||||
touch(`website:${website.id}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue