From 2c46a37a5322948e6cd37aec78da61c0f13eddc3 Mon Sep 17 00:00:00 2001 From: Owen Date: Mon, 6 Oct 2025 10:31:31 -0700 Subject: [PATCH] Include in hybrid --- server/routers/private/hybrid.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/server/routers/private/hybrid.ts b/server/routers/private/hybrid.ts index dc55bc0d..2b59aa40 100644 --- a/server/routers/private/hybrid.ts +++ b/server/routers/private/hybrid.ts @@ -33,7 +33,9 @@ import { targets, loginPage, loginPageOrg, - LoginPage + LoginPage, + resourceHeaderAuth, + ResourceHeaderAuth } from "@server/db"; import { resources, @@ -200,6 +202,7 @@ export type ResourceWithAuth = { resource: Resource | null; pincode: ResourcePincode | null; password: ResourcePassword | null; + headerAuth: ResourceHeaderAuth | null; }; export type UserSessionWithUser = { @@ -478,6 +481,10 @@ hybridRouter.get( resourcePassword, eq(resourcePassword.resourceId, resources.resourceId) ) + .leftJoin( + resourceHeaderAuth, + eq(resourceHeaderAuth.resourceId, resources.resourceId) + ) .where(eq(resources.fullDomain, domain)) .limit(1); @@ -509,7 +516,8 @@ hybridRouter.get( const resourceWithAuth: ResourceWithAuth = { resource: result.resources, pincode: result.resourcePincode, - password: result.resourcePassword + password: result.resourcePassword, + headerAuth: result.resourceHeaderAuth }; return response(res, {