New folder for middleware created. File structure reorganized
This commit is contained in:
@@ -81,16 +81,16 @@ app.use(express.static(path.join(__dirname, 'resources')));
|
||||
// <!-- Section 4 : Middleware -->
|
||||
// *****************************************************
|
||||
|
||||
// Importing middleware
|
||||
const fetchMatchesData = require('./resources/routes/navigation-bar/current-match-information');
|
||||
const convert_time = require('./resources/js/navigation-bar/scoreboard-header/convert-time');
|
||||
|
||||
// Using middleware
|
||||
// Middleware to automatically update live scoreboard
|
||||
const fetchMatchesData = require('./resources/middleware/navigation-bar/current-match-information');
|
||||
app.use(fetchMatchesData);
|
||||
|
||||
//Middleware to automatically update in-game time abbreviations
|
||||
const convert_time = require('./resources/middleware/navigation-bar/convert-time');
|
||||
app.use(convert_time);
|
||||
|
||||
// Middleware function to fetch leagues data
|
||||
const fetchLeaguesData = require('./resources/routes/league-pages/get-current-league-information');
|
||||
const fetchLeaguesData = require('./resources/middleware/league-page/get-current-league-information');
|
||||
|
||||
// Define the route for fetching league data
|
||||
app.get('/league/:leagueID', fetchLeaguesData, (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user