forked from UKSOURCE/cms.hailearning.edu.vn
change :// to ??
This commit is contained in:
@@ -141,7 +141,7 @@ exports.apiVerify = async (req, res) => {
|
|||||||
if (!cert) return res.status(404).json({ error: 'Certificate not found' });
|
if (!cert) return res.status(404).json({ error: 'Certificate not found' });
|
||||||
if (cert.status === 'revoked') return res.status(404).json({ error: 'Certificate has been revoked' });
|
if (cert.status === 'revoked') return res.status(404).json({ error: 'Certificate has been revoked' });
|
||||||
|
|
||||||
const baseUrl = `${req.protocol}://${req.get('host')}`;
|
const baseUrl = process.env.BACKEND_URL ?? `${req.protocol}://${req.get('host')}`;
|
||||||
const buildUrl = (f) => f ? [generateSignedUrl(baseUrl, path.basename(f))] : undefined;
|
const buildUrl = (f) => f ? [generateSignedUrl(baseUrl, path.basename(f))] : undefined;
|
||||||
|
|
||||||
const response = {
|
const response = {
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ exports.apiVerify = async (req, res) => {
|
|||||||
if (!qual) return res.status(404).json({ error: 'Degree not found' });
|
if (!qual) return res.status(404).json({ error: 'Degree not found' });
|
||||||
if (qual.status === 'revoked') return res.status(404).json({ error: 'Degree has been revoked' });
|
if (qual.status === 'revoked') return res.status(404).json({ error: 'Degree has been revoked' });
|
||||||
|
|
||||||
const baseUrl = `${req.protocol}://${req.get('host')}`;
|
const baseUrl = process.env.BACKEND_URL ?? `${req.protocol}://${req.get('host')}`;
|
||||||
const buildUrl = (f) => f ? [generateSignedUrl(baseUrl, path.basename(f))] : undefined;
|
const buildUrl = (f) => f ? [generateSignedUrl(baseUrl, path.basename(f))] : undefined;
|
||||||
|
|
||||||
const response = {
|
const response = {
|
||||||
|
|||||||
Reference in New Issue
Block a user