add sqlite migration

This commit is contained in:
miloschwartz
2025-12-07 12:58:01 -05:00
parent f66a9bdd33
commit 2418813902
3 changed files with 363 additions and 7 deletions

View File

@@ -5,7 +5,6 @@ import { and, eq } from "drizzle-orm";
import createHttpError from "http-errors";
import HttpCode from "@server/types/HttpCode";
import { checkOrgAccessPolicy } from "#dynamic/lib/checkOrgAccessPolicy";
import logger from "@server/logger";
export async function verifyOrgAccess(
req: Request,
@@ -27,8 +26,6 @@ export async function verifyOrgAccess(
);
}
logger.debug(`Verifying access for user ${userId} to organization ${orgId}`);
try {
if (!req.userOrg) {
const userOrgRes = await db
@@ -71,9 +68,6 @@ export async function verifyOrgAccess(
req.userOrgRoleId = req.userOrg.roleId;
req.userOrgId = orgId;
logger.debug(
`User ${userId} has access to organization ${orgId} with role ${req.userOrg.roleId}`
);
return next();
} catch (e) {
return next(