Skip to content

Commit

Permalink
improve font url handling
Browse files Browse the repository at this point in the history
  • Loading branch information
kkatusic committed Jan 21, 2025
1 parent 8e8f471 commit e33a3ea
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/services/cronJobs/generateSitemapOnFrontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@ export const runGenerateSitemapOnFrontend = () => {
logger.debug('runGenerateSitemapOnFrontend() job has started');
logger.debug('FRONTEND_URL:', process.env.FRONTEND_URL);
try {
const projects = await fetchProjects();
const users = await fetchUsers();
const qfRounds = await fetchQFRounds();

if (!process.env.FRONTEND_URL) {
if (!FRONTEND_URL || FRONTEND_URL.trim() === '') {
logger.error(
'FRONTEND_URL is not defined in the environment variables',
);
return;
}

const projects = await fetchProjects();
const users = await fetchUsers();
const qfRounds = await fetchQFRounds();

const frontendUrl = FRONTEND_URL.startsWith('http')
? FRONTEND_URL.trim()
: `https://${FRONTEND_URL.trim()}`;
Expand Down

0 comments on commit e33a3ea

Please sign in to comment.