mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
Attempt to fix loginPageOrg undefined error
This commit is contained in:
@@ -618,6 +618,16 @@ hybridRouter.get(
|
|||||||
)
|
)
|
||||||
.limit(1);
|
.limit(1);
|
||||||
|
|
||||||
|
if (!result) {
|
||||||
|
return response<LoginPage | null>(res, {
|
||||||
|
data: null,
|
||||||
|
success: true,
|
||||||
|
error: false,
|
||||||
|
message: "Login page not found",
|
||||||
|
status: HttpCode.OK
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
await checkExitNodeOrg(
|
await checkExitNodeOrg(
|
||||||
remoteExitNode.exitNodeId,
|
remoteExitNode.exitNodeId,
|
||||||
@@ -633,16 +643,6 @@ hybridRouter.get(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!result) {
|
|
||||||
return response<LoginPage | null>(res, {
|
|
||||||
data: null,
|
|
||||||
success: true,
|
|
||||||
error: false,
|
|
||||||
message: "Login page not found",
|
|
||||||
status: HttpCode.OK
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return response<LoginPage>(res, {
|
return response<LoginPage>(res, {
|
||||||
data: result.loginPage,
|
data: result.loginPage,
|
||||||
success: true,
|
success: true,
|
||||||
|
|||||||
@@ -40,6 +40,11 @@ async function query(orgId: string | undefined, fullDomain: string) {
|
|||||||
eq(loginPage.loginPageId, loginPageOrg.loginPageId)
|
eq(loginPage.loginPageId, loginPageOrg.loginPageId)
|
||||||
)
|
)
|
||||||
.limit(1);
|
.limit(1);
|
||||||
|
|
||||||
|
if (!res) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...res.loginPage,
|
...res.loginPage,
|
||||||
orgId: res.loginPageOrg.orgId
|
orgId: res.loginPageOrg.orgId
|
||||||
@@ -65,6 +70,11 @@ async function query(orgId: string | undefined, fullDomain: string) {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
.limit(1);
|
.limit(1);
|
||||||
|
|
||||||
|
if (!res) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...res,
|
...res,
|
||||||
orgId: orgLink.orgId
|
orgId: orgLink.orgId
|
||||||
|
|||||||
@@ -48,6 +48,11 @@ async function query(orgId: string) {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
.limit(1);
|
.limit(1);
|
||||||
|
|
||||||
|
if (!res) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...res,
|
...res,
|
||||||
orgId: orgLink.orgs.orgId,
|
orgId: orgLink.orgs.orgId,
|
||||||
|
|||||||
Reference in New Issue
Block a user