backend: rename buildDefaultPreferences to getDefaultPreferences for clarity

This commit is contained in:
Carlos Santos 2025-06-04 11:56:02 +02:00
parent 895c96e141
commit cf27433e2d
2 changed files with 4 additions and 4 deletions

View File

@ -81,7 +81,7 @@ export class MeetStorageService<
const redisKey = RedisKeyName.GLOBAL_PREFERENCES; const redisKey = RedisKeyName.GLOBAL_PREFERENCES;
const storageKey = this.keyBuilder.buildGlobalPreferencesKey(); const storageKey = this.keyBuilder.buildGlobalPreferencesKey();
const preferences = this.buildDefaultPreferences(); const preferences = this.getDefaultPreferences();
this.logger.verbose('Initializing global preferences with default values'); this.logger.verbose('Initializing global preferences with default values');
const existing = await this.getFromCacheAndStorage<GPrefs>(redisKey, storageKey); const existing = await this.getFromCacheAndStorage<GPrefs>(redisKey, storageKey);
@ -123,7 +123,7 @@ export class MeetStorageService<
// Build and save default preferences if not found in cache or storage // Build and save default preferences if not found in cache or storage
await this.initializeGlobalPreferences(); await this.initializeGlobalPreferences();
return this.buildDefaultPreferences(); return this.getDefaultPreferences();
} }
/** /**
@ -737,7 +737,7 @@ export class MeetStorageService<
* Returns the default global preferences. * Returns the default global preferences.
* @returns {GPrefs} * @returns {GPrefs}
*/ */
protected buildDefaultPreferences(): GPrefs { protected getDefaultPreferences(): GPrefs {
return { return {
projectId: MEET_NAME_ID, projectId: MEET_NAME_ID,
webhooksPreferences: { webhooksPreferences: {

View File

@ -19,7 +19,7 @@ const defaultPreferences = {
}; };
const restoreDefaultGlobalPreferences = async () => { const restoreDefaultGlobalPreferences = async () => {
const defaultPref = await container.get(MeetStorageService)['buildDefaultPreferences'](); const defaultPref = await container.get(MeetStorageService)['getDefaultPreferences']();
await container.get(MeetStorageService).saveGlobalPreferences(defaultPref); await container.get(MeetStorageService).saveGlobalPreferences(defaultPref);
}; };