Remove useless redirect and do it right the first time
This commit is contained in:
@@ -56,7 +56,7 @@ async function main() {
|
|||||||
card.querySelector('.event-time .event-time-seperator').style.display = 'inline';
|
card.querySelector('.event-time .event-time-seperator').style.display = 'inline';
|
||||||
}
|
}
|
||||||
|
|
||||||
card.querySelector('a.event-link').setAttribute('href', event.id);
|
card.querySelector('a.event-link').setAttribute('href', `single.html?event=${event.id}`);
|
||||||
|
|
||||||
currentContainer.querySelector('.grid').append(card);
|
currentContainer.querySelector('.grid').append(card);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,8 +35,4 @@ payload.init({
|
|||||||
|
|
||||||
app.use(express.static(path.join(__dirname, '../public')));
|
app.use(express.static(path.join(__dirname, '../public')));
|
||||||
|
|
||||||
app.get(/^\/[0-9a-fA-F]{24}$/, (req, res) => {
|
|
||||||
res.redirect(`/single.html?event=${req.path.split('/')[1]}`);
|
|
||||||
});
|
|
||||||
|
|
||||||
app.listen(process.env.LISTEN_PORT);
|
app.listen(process.env.LISTEN_PORT);
|
||||||
|
|||||||
Reference in New Issue
Block a user