From 9323629666bb1c6a3f52f0a51e6071205be3cd41 Mon Sep 17 00:00:00 2001 From: Jacob Zweifel Date: Fri, 6 Oct 2023 14:27:37 -0500 Subject: [PATCH] decorate context with db --- src/context/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/context/index.ts b/src/context/index.ts index 5655d3d..c8f5838 100644 --- a/src/context/index.ts +++ b/src/context/index.ts @@ -4,6 +4,7 @@ import { HoltLogger } from "@tlscipher/holt"; import { Elysia } from "elysia"; import { auth } from "../auth"; import { config } from "../config"; +import { client as db } from "../db"; import { loggerConfig } from "../lib"; export const ctx = new Elysia({ @@ -20,6 +21,7 @@ export const ctx = new Elysia({ return { session }; }) .use(logger(loggerConfig)) + .decorate("db", db) .use( // @ts-expect-error config.env.NODE_ENV === "development"