generated from Seekra/repository-template
Merge pull request 'Feat(settings): function to set settings' (#179) from feature/set-setting-function into main
Deploy on dev / Deploy on dev (push) Successful in 35s
Deploy on dev / Deploy on dev (push) Successful in 35s
Reviewed-on: #179 Reviewed-by: Jakob Gregory
This commit was merged in pull request #179.
This commit is contained in:
@@ -40,5 +40,15 @@ export const useSettings = function useSettings () {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return { getSetting };
|
/**
|
||||||
|
* Sets the value of a specific setting.
|
||||||
|
* @param {string[]} key - The setting key.
|
||||||
|
* @param value - The new value for the setting.
|
||||||
|
*/
|
||||||
|
const setSetting = function setSetting (key, value) {
|
||||||
|
const settingsStore = useSettingsStore();
|
||||||
|
settingsStore.set(key.join('.'), value);
|
||||||
|
};
|
||||||
|
|
||||||
|
return { getSetting, setSetting };
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user