Skip to content

Commit db2487f

Browse files
committed
fix: remove styling from syncing page to prevent 503 status codes on linked stylesheets & scripts
1 parent 456055e commit db2487f

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/main.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ usePassport(app);
4343
app.use(async function(req: express.Request, res: express.Response, next: express.NextFunction) {
4444
if (!firstSyncComplete) {
4545
console.log(`A visitor requested the path ${req.path}, but we haven't finished syncing yet. Showing a waiting page.`);
46-
res.render('syncing.njk');
47-
res.status(503);
46+
res.status(503).render('syncing.njk');
4847
}
4948
else {
5049
next();

templates/syncing.njk

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{% extends "base.njk" %}
2-
{% set noheader = true %}
3-
{% set title = "Starting..." %}
4-
5-
{% block content %}
6-
<h1>CodamHero is starting...</h1>
7-
<p>Please come back in a few minutes, when the synchronization with 42's Intra API has completed.</p>
8-
{% endblock %}
1+
<h1>CodamHero is starting...</h1>
2+
<p>Please come back in a few minutes, when the synchronization with 42's Intra API has completed.</p>

0 commit comments

Comments
 (0)