forked from UKSOURCE/cms.hailearning.edu.vn
change || to ??
This commit is contained in:
@@ -192,12 +192,7 @@ exports.api = async (req, res) => {
|
||||
try {
|
||||
let data = await getHomeData();
|
||||
const baseUrl =
|
||||
process.env.BACKEND_URL || `${req.protocol}://${req.get("host")}`;
|
||||
|
||||
console.log("[homeController.api] BACKEND_URL=", process.env.BACKEND_URL);
|
||||
console.log("[homeController.api] BACKEND_URL raw:", JSON.stringify(process.env.BACKEND_URL));
|
||||
console.log("[homeController.api] BACKEND_URL truthy:", !!process.env.BACKEND_URL);
|
||||
console.log("[homeController.api] resolved baseUrl=", baseUrl);
|
||||
process.env.BACKEND_URL ?? `${req.protocol}://${req.get("host")}`;
|
||||
|
||||
// === Xử lý Blog Preview động ===
|
||||
const blogPreview = data.blogPreview || {};
|
||||
|
||||
Reference in New Issue
Block a user