added js and worked on Login feature(still in progress)

This commit is contained in:
Vishal Vunnam
2024-04-17 18:06:45 -06:00
parent 77b990cd1e
commit 6faec75ae2
15 changed files with 99 additions and 23 deletions

View File

@@ -63,7 +63,6 @@ const fetchClubsData = async (req, res, next) => {
staff: clubData.staff,
lastUpdated: clubData.lastUpdated
};
next();
} catch (error) {
console.error('Error fetching clubs data:', error);

View File

@@ -17,6 +17,8 @@ const fetchLeaguesData = async (req, res, next) => {
const leagueData = response.data;
// Attach the data to res.locals
res.locals.username = req.session.user.username;
console.log(req.session.user)
res.locals.league = {
area: {
league_flag: leagueData.area.flag,
@@ -39,7 +41,7 @@ const fetchLeaguesData = async (req, res, next) => {
draws: team.draw,
goal_difference: team.goalDifference,
points: team.points
}))
})),
};
next();
} catch (error) {