Commit f2285f29 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

refac: save only to db

parent ee913cb6
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
return; return;
} }
settings.set({ ...$settings, models: selectedModels }); settings.set({ ...$settings, models: selectedModels });
localStorage.setItem('settings', JSON.stringify($settings));
await updateUserSettings(localStorage.token, { ui: $settings }); await updateUserSettings(localStorage.token, { ui: $settings });
if ($user.role === 'admin') { if ($user.role === 'admin') {
......
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
console.log(updated); console.log(updated);
await settings.set({ ...$settings, ...updated }); await settings.set({ ...$settings, ...updated });
await models.set(await getModels()); await models.set(await getModels());
localStorage.setItem('settings', JSON.stringify($settings));
await updateUserSettings(localStorage.token, { ui: $settings }); await updateUserSettings(localStorage.token, { ui: $settings });
}; };
......
...@@ -184,9 +184,7 @@ ...@@ -184,9 +184,7 @@
const saveSettings = async (updated) => { const saveSettings = async (updated) => {
await settings.set({ ...$settings, ...updated }); await settings.set({ ...$settings, ...updated });
localStorage.setItem('settings', JSON.stringify($settings));
await updateUserSettings(localStorage.token, { ui: $settings }); await updateUserSettings(localStorage.token, { ui: $settings });
location.href = '/'; location.href = '/';
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment