Fix ssl undefined issue

This commit is contained in:
Owen
2025-10-08 16:43:40 -07:00
parent 1b01c4f053
commit 526307e192

View File

@@ -103,18 +103,18 @@ export async function getResourceAuthInfo(
.limit(1);
const resource = result?.resources;
const pincode = result?.resourcePincode;
const password = result?.resourcePassword;
const headerAuth = result?.resourceHeaderAuth;
const url = `${resource.ssl ? "https" : "http"}://${resource.fullDomain}`;
if (!resource) {
return next(
createHttpError(HttpCode.NOT_FOUND, "Resource not found")
);
}
const pincode = result?.resourcePincode;
const password = result?.resourcePassword;
const headerAuth = result?.resourceHeaderAuth;
const url = `${resource.ssl ? "https" : "http"}://${resource.fullDomain}`;
return response<GetResourceAuthInfoResponse>(res, {
data: {
niceId: resource.niceId,