diff --git a/ProjectSourceCode/src/index.js b/ProjectSourceCode/src/index.js index 65c9749..1146ef6 100644 --- a/ProjectSourceCode/src/index.js +++ b/ProjectSourceCode/src/index.js @@ -81,16 +81,16 @@ app.use(express.static(path.join(__dirname, 'resources'))); // // ***************************************************** -// 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) => { diff --git a/ProjectSourceCode/src/resources/routes/league-pages/get-current-league-information.js b/ProjectSourceCode/src/resources/middleware/league-page/get-current-league-information.js similarity index 100% rename from ProjectSourceCode/src/resources/routes/league-pages/get-current-league-information.js rename to ProjectSourceCode/src/resources/middleware/league-page/get-current-league-information.js diff --git a/ProjectSourceCode/src/resources/js/navigation-bar/scoreboard-header/convert-time.js b/ProjectSourceCode/src/resources/middleware/navigation-bar/convert-time.js similarity index 100% rename from ProjectSourceCode/src/resources/js/navigation-bar/scoreboard-header/convert-time.js rename to ProjectSourceCode/src/resources/middleware/navigation-bar/convert-time.js diff --git a/ProjectSourceCode/src/resources/routes/navigation-bar/current-match-information.js b/ProjectSourceCode/src/resources/middleware/navigation-bar/current-match-information.js similarity index 100% rename from ProjectSourceCode/src/resources/routes/navigation-bar/current-match-information.js rename to ProjectSourceCode/src/resources/middleware/navigation-bar/current-match-information.js diff --git a/ProjectSourceCode/src/resources/js/homepage/redirect-to-league-url.js b/ProjectSourceCode/src/resources/routes/league-pages/redirect-to-league-url.js similarity index 100% rename from ProjectSourceCode/src/resources/js/homepage/redirect-to-league-url.js rename to ProjectSourceCode/src/resources/routes/league-pages/redirect-to-league-url.js diff --git a/ProjectSourceCode/src/views/partials/footer.hbs b/ProjectSourceCode/src/views/partials/footer.hbs index 0ea6ed2..ead7ec1 100644 --- a/ProjectSourceCode/src/views/partials/footer.hbs +++ b/ProjectSourceCode/src/views/partials/footer.hbs @@ -11,7 +11,7 @@ - +