static import and error catching

This commit is contained in:
Jakub Trávník 2026-01-08 15:22:20 +01:00
parent e6793c9655
commit 87d267a1c3

View file

@ -13,6 +13,7 @@ import { repositoriesService } from "../repositories/repositories.service";
import { notificationsService } from "../notifications/notifications.service";
import { VolumeAutoRemountJob } from "~/server/jobs/auto-remount";
import { cache } from "~/server/utils/cache";
import { initAuth } from "~/lib/auth";
const ensureLatestConfigurationSchema = async () => {
const volumes = await db.query.volumesTable.findMany({});
@ -50,8 +51,10 @@ export const startup = async () => {
logger.error(`Error ensuring restic passfile exists: ${err.message}`);
});
const { initAuth } = await import("~/lib/auth");
await initAuth();
await initAuth().catch((err) => {
logger.error(`Error initializing auth: ${err.message}`);
throw err;
});
await ensureLatestConfigurationSchema();