mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-24 14:31:44 +01:00
fix: removes fetch request when user does not exist (#2473)
This commit is contained in:
@@ -33,12 +33,14 @@ export const DEFAULT_SETTINGS: Settings = {
|
||||
export const settings = useStorage(DOZZLE_SETTINGS_KEY, DEFAULT_SETTINGS);
|
||||
settings.value = { ...DEFAULT_SETTINGS, ...settings.value, ...config.serverSettings };
|
||||
|
||||
watch(settings, (value) => {
|
||||
fetch(withBase("/api/profile/settings"), {
|
||||
method: "PUT",
|
||||
body: JSON.stringify(value),
|
||||
if (config.user) {
|
||||
watch(settings, (value) => {
|
||||
fetch(withBase("/api/profile/settings"), {
|
||||
method: "PUT",
|
||||
body: JSON.stringify(value),
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export const {
|
||||
collapseNav,
|
||||
|
||||
Reference in New Issue
Block a user