feat(dashboard): setting up layout

This commit is contained in:
2025-11-12 16:51:59 +02:00
parent b8b2a15ee9
commit a3f46b6b38
61 changed files with 2957 additions and 123 deletions
+23
View File
@@ -0,0 +1,23 @@
import { type Database, db } from "@basango/db/client";
import type { Session } from "@/utils/auth";
export const withDatabase = async <TReturn>(opts: {
ctx: {
session?: Session | null;
db: Database;
};
next: (opts: {
ctx: {
session?: Session | null;
db: Database;
};
}) => Promise<TReturn>;
}) => {
const { ctx, next } = opts;
ctx.db = db;
const result = await next({ ctx });
return result;
};