|
|
@ -514,7 +514,7 @@ export const PlatformServiceMixin = { |
|
|
|
* Utility method for retrieving master settings |
|
|
|
* Common pattern used across many components |
|
|
|
*/ |
|
|
|
async $getMasterSettings( |
|
|
|
async _getMasterSettings( |
|
|
|
fallback: Settings | null = null, |
|
|
|
): Promise<Settings | null> { |
|
|
|
try { |
|
|
@ -571,7 +571,7 @@ export const PlatformServiceMixin = { |
|
|
|
): Promise<Settings> { |
|
|
|
try { |
|
|
|
// Get default settings
|
|
|
|
const defaultSettings = await this.$getMasterSettings(defaultFallback); |
|
|
|
const defaultSettings = await this._getMasterSettings(defaultFallback); |
|
|
|
|
|
|
|
// If no account DID, return defaults
|
|
|
|
if (!accountDid) { |
|
|
@ -970,7 +970,7 @@ export const PlatformServiceMixin = { |
|
|
|
* @returns Fresh settings object from database |
|
|
|
*/ |
|
|
|
async $settings(defaults: Settings = {}): Promise<Settings> { |
|
|
|
const settings = await this.$getMasterSettings(defaults); |
|
|
|
const settings = await this._getMasterSettings(defaults); |
|
|
|
|
|
|
|
if (!settings) { |
|
|
|
return defaults; |
|
|
@ -1003,7 +1003,7 @@ export const PlatformServiceMixin = { |
|
|
|
): Promise<Settings> { |
|
|
|
try { |
|
|
|
// Get default settings first
|
|
|
|
const defaultSettings = await this.$getMasterSettings(defaults); |
|
|
|
const defaultSettings = await this._getMasterSettings(defaults); |
|
|
|
|
|
|
|
if (!defaultSettings) { |
|
|
|
return defaults; |
|
|
@ -1848,7 +1848,7 @@ export const PlatformServiceMixin = { |
|
|
|
async $debugMergedSettings(did: string): Promise<void> { |
|
|
|
try { |
|
|
|
// Get default settings
|
|
|
|
const defaultSettings = await this.$getMasterSettings({}); |
|
|
|
const defaultSettings = await this._getMasterSettings({}); |
|
|
|
logger.debug( |
|
|
|
`[PlatformServiceMixin] Default settings:`, |
|
|
|
defaultSettings, |
|
|
@ -1898,7 +1898,6 @@ export interface IPlatformServiceMixin { |
|
|
|
params?: unknown[], |
|
|
|
): Promise<SqlValue[] | undefined>; |
|
|
|
$dbRawQuery(sql: string, params?: unknown[]): Promise<unknown | undefined>; |
|
|
|
$getMasterSettings(fallback?: Settings | null): Promise<Settings | null>; |
|
|
|
$getMergedSettings( |
|
|
|
defaultKey: string, |
|
|
|
accountDid?: string, |
|
|
@ -2023,7 +2022,6 @@ declare module "@vue/runtime-core" { |
|
|
|
params?: unknown[], |
|
|
|
): Promise<unknown[] | undefined>; |
|
|
|
$dbRawQuery(sql: string, params?: unknown[]): Promise<unknown | undefined>; |
|
|
|
$getMasterSettings(defaults?: Settings | null): Promise<Settings | null>; |
|
|
|
$getMergedSettings( |
|
|
|
key: string, |
|
|
|
did?: string, |
|
|
|