MCPcopy
hub / github.com/pickle-com/glass / getSettings

Function getSettings

src/features/settings/settingsService.js:224–238  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

222}
223
224async function getSettings() {
225 try {
226 const uid = authService.getCurrentUserId();
227 const userSettingsKey = uid ? `users.${uid}` : 'users.default';
228
229 const defaultSettings = getDefaultSettings();
230 const savedSettings = store.get(userSettingsKey, {});
231
232 currentSettings = { ...defaultSettings, ...savedSettings };
233 return currentSettings;
234 } catch (error) {
235 console.error('[SettingsService] Error getting settings from store:', error);
236 return getDefaultSettings();
237 }
238}
239
240async function saveSettings(settings) {
241 try {

Callers 1

updateContentProtectionFunction · 0.85

Calls 3

getDefaultSettingsFunction · 0.85
getCurrentUserIdMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected