save settings by username

This commit is contained in:
MiniDigger | Martin 2022-07-27 16:18:11 +02:00
parent d089a898b7
commit 3065e77aa6

View File

@ -59,7 +59,7 @@ export const useSettingsStore = defineStore("settings", () => {
};
try {
await (store.user?.id
? useInternalApi("users/" + store.user?.id + "/settings/", true, "post", data)
? useInternalApi("users/" + store.user?.name + "/settings/", true, "post", data)
: useInternalApi("users/anon/settings/", false, "post", data));
} catch (e) {
settingsLog("cant save settings", e);