Fixes to live scoreboard and file formatting
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#login-screen-container {
|
||||
#login-page {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,3 +16,15 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
// Listen for click event on the register button
|
||||
$('#register-button').click(function (event) {
|
||||
event.preventDefault(); // Prevent the default action of following the link
|
||||
|
||||
$('#login-screen-container').hide();
|
||||
// Show the register container
|
||||
$('#register-screen-container').show();
|
||||
});
|
||||
});
|
||||
@@ -1,12 +0,0 @@
|
||||
$(document).ready(function () {
|
||||
|
||||
// Listen for click event on the register button
|
||||
$('#register-button').click(function (event) {
|
||||
event.preventDefault(); // Prevent the default action of following the link
|
||||
|
||||
$('#login-screen-container').hide();
|
||||
// Show the register container
|
||||
$('#register-screen-container').show();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -7,13 +7,13 @@ const fetchMatchesData = async (req, res, next) => {
|
||||
const today = moment().format('YYYY-MM-DD'); // Get today's date in YYYY-MM-DD format
|
||||
|
||||
// Subtract one day to get yesterday's date
|
||||
const yesterdayUnformatted = moment().subtract(4, 'days');
|
||||
const yesterdayUnformatted = moment().subtract(1, 'days');
|
||||
|
||||
// Format yesterday's date as YYYY-MM-DD
|
||||
const yesterday = yesterdayUnformatted.format('YYYY-MM-DD');
|
||||
|
||||
// Array of years to fetch matches data
|
||||
const league_ids = [2021]; /* Readd , 2002, 2014, 2019, 2015, 2013 */
|
||||
const league_ids = [2021, 2002, 2014, 2019, 2015, 2013];
|
||||
|
||||
// Array to store all matches data
|
||||
let allMatches = [];
|
||||
@@ -21,7 +21,7 @@ const fetchMatchesData = async (req, res, next) => {
|
||||
// Loop through each year and fetch matches data
|
||||
for (const league_id of league_ids) {
|
||||
const response = await axios({
|
||||
url: `http://api.football-data.org/v4/competitions/2021/matches`, /* Resinsert ${league_id} for 2021 */
|
||||
url: `http://api.football-data.org/v4/competitions/${league_id}/matches`,
|
||||
method: 'GET',
|
||||
params: {
|
||||
dateFrom: yesterday, // Set dateFrom to yesterday's date
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
|
||||
<!-- Navigation Bar Scripts -->
|
||||
<script src="/js/navigation-bar/navigation-bar-follow.js"></script>
|
||||
<script src="/js/navigation-bar/user/login.js"></script>
|
||||
<script src="/js/navigation-bar/user/register.js"></script>
|
||||
<script src="/js/navigation-bar/user/login-and-register-page-linking.js"></script>
|
||||
|
||||
<!-- Homepage Scripts -->
|
||||
<script src="/routes/league-pages/redirect-to-league-url.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user