forked from lucaspatenaude/ScoreSpot
added js and worked on Login feature(still in progress)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user