Remove useless redirect and do it right the first time

This commit is contained in:
2022-07-25 21:41:34 +00:00
parent 1065055cdb
commit 4f20c073cc
2 changed files with 1 additions and 5 deletions

View File

@@ -56,7 +56,7 @@ async function main() {
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);
}

View File

@@ -35,8 +35,4 @@ payload.init({
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);