forked from jsnbuchanan/crowd-funder-for-time-pwa
Lint-fix
This commit is contained in:
@@ -220,13 +220,20 @@ export const PlatformServiceMixin = {
|
||||
const obj: Record<string, unknown> = {};
|
||||
columns.forEach((column, index) => {
|
||||
let value = row[index];
|
||||
|
||||
|
||||
// Convert SQLite integer booleans to JavaScript booleans
|
||||
if (column === 'isRegistered' || column === 'finishedOnboarding' ||
|
||||
column === 'filterFeedByVisible' || column === 'filterFeedByNearby' ||
|
||||
column === 'hideRegisterPromptOnNewContact' || column === 'showContactGivesInline' ||
|
||||
column === 'showGeneralAdvanced' || column === 'showShortcutBvc' ||
|
||||
column === 'warnIfProdServer' || column === 'warnIfTestServer') {
|
||||
if (
|
||||
column === "isRegistered" ||
|
||||
column === "finishedOnboarding" ||
|
||||
column === "filterFeedByVisible" ||
|
||||
column === "filterFeedByNearby" ||
|
||||
column === "hideRegisterPromptOnNewContact" ||
|
||||
column === "showContactGivesInline" ||
|
||||
column === "showGeneralAdvanced" ||
|
||||
column === "showShortcutBvc" ||
|
||||
column === "warnIfProdServer" ||
|
||||
column === "warnIfTestServer"
|
||||
) {
|
||||
if (value === 1) {
|
||||
value = true;
|
||||
} else if (value === 0) {
|
||||
@@ -234,7 +241,7 @@ export const PlatformServiceMixin = {
|
||||
}
|
||||
// Keep null values as null
|
||||
}
|
||||
|
||||
|
||||
obj[column] = value;
|
||||
});
|
||||
return obj;
|
||||
@@ -1401,7 +1408,9 @@ export const PlatformServiceMixin = {
|
||||
);
|
||||
|
||||
if (!result?.values?.length) {
|
||||
logger.warn(`[PlatformServiceMixin] No settings found for DID: ${did}`);
|
||||
logger.warn(
|
||||
`[PlatformServiceMixin] No settings found for DID: ${did}`,
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1411,7 +1420,9 @@ export const PlatformServiceMixin = {
|
||||
);
|
||||
|
||||
if (!mappedResults.length) {
|
||||
logger.warn(`[PlatformServiceMixin] Failed to map settings for DID: ${did}`);
|
||||
logger.warn(
|
||||
`[PlatformServiceMixin] Failed to map settings for DID: ${did}`,
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1426,7 +1437,10 @@ export const PlatformServiceMixin = {
|
||||
|
||||
return settings;
|
||||
} catch (error) {
|
||||
logger.error(`[PlatformServiceMixin] Error debugging settings for DID ${did}:`, error);
|
||||
logger.error(
|
||||
`[PlatformServiceMixin] Error debugging settings for DID ${did}:`,
|
||||
error,
|
||||
);
|
||||
return null;
|
||||
}
|
||||
},
|
||||
@@ -1440,14 +1454,24 @@ export const PlatformServiceMixin = {
|
||||
async $debugMergedSettings(did: string): Promise<void> {
|
||||
try {
|
||||
// Get default settings
|
||||
const defaultSettings = await this.$getSettings(MASTER_SETTINGS_KEY, {});
|
||||
logger.info(`[PlatformServiceMixin] Default settings:`, defaultSettings);
|
||||
const defaultSettings = await this.$getSettings(
|
||||
MASTER_SETTINGS_KEY,
|
||||
{},
|
||||
);
|
||||
logger.info(
|
||||
`[PlatformServiceMixin] Default settings:`,
|
||||
defaultSettings,
|
||||
);
|
||||
|
||||
// Get DID-specific settings
|
||||
const didSettings = await this.$debugDidSettings(did);
|
||||
|
||||
// Get merged settings
|
||||
const mergedSettings = await this.$getMergedSettings(MASTER_SETTINGS_KEY, did, defaultSettings || {});
|
||||
const mergedSettings = await this.$getMergedSettings(
|
||||
MASTER_SETTINGS_KEY,
|
||||
did,
|
||||
defaultSettings || {},
|
||||
);
|
||||
|
||||
logger.info(`[PlatformServiceMixin] Merged settings for ${did}:`, {
|
||||
defaultSettings,
|
||||
@@ -1456,7 +1480,10 @@ export const PlatformServiceMixin = {
|
||||
isRegistered: mergedSettings.isRegistered,
|
||||
});
|
||||
} catch (error) {
|
||||
logger.error(`[PlatformServiceMixin] Error debugging merged settings for DID ${did}:`, error);
|
||||
logger.error(
|
||||
`[PlatformServiceMixin] Error debugging merged settings for DID ${did}:`,
|
||||
error,
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user