club homepage complete

This commit is contained in:
dominicjk
2024-04-15 14:14:23 -06:00
parent 411e6bf584
commit 0bd33dcd1a
6 changed files with 90 additions and 38 deletions

View File

@@ -108,8 +108,9 @@ app.get('/league/:leagueID', [fetchLeaguesData, fetchLeagueScorerData], (req, re
// Clubs Page Middleware
const fetchClubsData = require('./resources/middleware/clubs-page/get-current-club-information');
const fetchClubTopScorers = require('./resources/middleware/clubs-page/get-current-club-top-scorers');
app.get('/club/:clubID', [fetchClubsData], (req, res) => {
app.get('/club/:clubID', [fetchClubsData, fetchClubTopScorers], (req, res) => {
// Render the Handlebars view with league data
res.render('pages/clubs-page', {
clubID: req.params.clubID,
@@ -117,8 +118,6 @@ app.get('/club/:clubID', [fetchClubsData], (req, res) => {
});
});
// *****************************************************
// <!-- Section 5 : API Routes -->
// *****************************************************