refactor(preferences): enhance PreferenceService with public access modifiers and improve caching logic

This commit updates the PreferenceService by adding public access modifiers to several methods, improving code clarity and consistency. It also refines the caching logic to eliminate unnecessary type assertions and streamline the handling of preference values. Additionally, minor formatting adjustments are made for better readability across the service and related hooks.
This commit is contained in:
fullex
2025-08-12 18:14:39 +08:00
parent b219e96544
commit 2860935e5b
7 changed files with 302 additions and 145 deletions
+2 -3
View File
@@ -97,9 +97,8 @@ export class PreferenceService {
throw new Error(`Preference ${key} not found in cache`)
}
const db = dbService.getDb()
await db
await dbService
.getDb()
.update(preferenceTable)
.set({
value: value as any