misc: add fix for v2 to app connection

This commit is contained in:
Sheen Capadngan
2025-09-09 16:40:32 +08:00
parent f86f3cea99
commit 1dcdb90c62

View File

@@ -386,7 +386,8 @@ export const appConnectionServiceFactory = ({
if (gatewayId) {
const [gateway] = await gatewayDAL.find({ id: gatewayId, orgId: actor.orgId });
if (!gateway) {
const [gatewayV2] = await gatewayV2DAL.find({ id: gatewayId, orgId: actor.orgId });
if (!gateway && !gatewayV2) {
throw new NotFoundError({
message: `Gateway with ID ${gatewayId} not found for org`
});