Commit fff5720d authored by Jarek Ostrowski's avatar Jarek Ostrowski

Posted dates aren't correct, correct them

parent c8e382fb
Pipeline #63084524 passed with stage
in 3 minutes and 49 seconds
......@@ -95,7 +95,7 @@ var Submission = mongoose.model('Submission', {
description: String,
request: String,
reviews: [{ type: Schema.Types.ObjectId, ref: 'Review' }],
postedDate: {},
postedDate: new Date(),
views: Number,
linkClicks: Number
})
......@@ -273,12 +273,6 @@ app.post('/upload', upload.single('thumbnail'), (req, res, next) => {
var month = todaysDate.getMonth()
var year = todaysDate.getFullYear()
var todaysDate = {
date: date,
month: month,
year: year
}
// set link to www if it doesn't include //
if (req.body.link.includes('http://') || req.body.link.includes('https://')) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment