Store dates as strings
parent
c55b9c241f
commit
8cd291ef2a
|
@ -1,5 +1,4 @@
|
|||
const database = require('./../database');
|
||||
const moment = require('moment');
|
||||
|
||||
|
||||
|
||||
|
@ -51,8 +50,9 @@ async function retrieveByTeamDivisionAndSeason(teamID, divisionID, seasonID) {
|
|||
teamScore = opponentIsTeam2 ? row[6] : row[7];
|
||||
opponentScore = opponentIsTeam2 ? row[7] : row[6];
|
||||
|
||||
gamesList.push(new Game(row[0], moment(row[3]), teamID, opponentID, teamScore, opponentScore));
|
||||
gamesList.push(new Game(row[0], row[3].toISOString().slice(0,10), teamID, opponentID, teamScore, opponentScore));
|
||||
});
|
||||
console.log(gamesList);
|
||||
return gamesList;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,11 +2,10 @@ var express = require('express');
|
|||
var router = express.Router();
|
||||
var genders = require('../database/scores/genders');
|
||||
var games = require('../database/scores/games');
|
||||
var moment = require('moment');
|
||||
|
||||
/* GET submit page. */
|
||||
router.get('/', function(req, res, next) {
|
||||
res.render('submit', { title: 'Submit Score', date: moment().format('YYYY-MM-DD') });
|
||||
res.render('submit', { title: 'Submit Score' });
|
||||
});
|
||||
|
||||
/* POST submit page. */
|
||||
|
|
Reference in New Issue