Calender & Linked Added

This commit is contained in:
JCBSComputer
2026-06-26 16:38:18 +02:00
parent ffa595451e
commit 68483e9b60
35 changed files with 5042 additions and 118 deletions
+4 -1
View File
@@ -16,9 +16,12 @@ pool.on("error", (err) => {
console.error("Unexpected database pool error:", err)
})
export async function query(text: string, params?: unknown[]) {
export async function query(text: string, params?: unknown[], userId?: string) {
const client = await pool.connect()
try {
if (userId) {
await client.query("SELECT set_config('app.current_user_id', $1, true)", [userId])
}
const result = await client.query(text, params)
return result
} finally {