mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
fix(instrumentation): await getSettings() — property access on Promise (#316 follow-up)
getSettings() is declared async so calling it without await left settings as a Promise<Record<string, unknown>>, causing 4 TS errors when accessing settings.modelAliases in the alias restore block.
This commit is contained in:
@@ -52,7 +52,7 @@ export async function register() {
|
||||
try {
|
||||
const { getSettings } = await import("@/lib/db/settings");
|
||||
const { setCustomAliases } = await import("@omniroute/open-sse/services/modelDeprecation.ts");
|
||||
const settings = getSettings();
|
||||
const settings = await getSettings();
|
||||
if (settings.modelAliases) {
|
||||
const aliases =
|
||||
typeof settings.modelAliases === "string"
|
||||
|
||||
Reference in New Issue
Block a user