Skip to content
Snippets Groups Projects
Commit 054e7c60 authored by Hyun Woo Jeong's avatar Hyun Woo Jeong
Browse files

임시로 디비 원복

parent 04a6ac30
No related branches found
No related tags found
No related merge requests found
...@@ -55,10 +55,9 @@ const ArticleSchema = new mongoose.Schema({ ...@@ -55,10 +55,9 @@ const ArticleSchema = new mongoose.Schema({
ref: 'User', ref: 'User',
}], }],
createdAt: { createdAt: {
type: String, type: Date,
default: Date.now, default: Date.now,
}, },
}); });
const Article = mongoose.model("Article", ArticleSchema); const Article = mongoose.model("Article", ArticleSchema);
......
...@@ -39,7 +39,7 @@ router.post("/upload", upload.array("img"), async function(req, res, next) { ...@@ -39,7 +39,7 @@ router.post("/upload", upload.array("img"), async function(req, res, next) {
const inputkeyword = req.body.keyword const inputkeyword = req.body.keyword
const inputlat = req.body.latitude const inputlat = req.body.latitude
const inputlng = req.body.longitude const inputlng = req.body.longitude
const currentTime = moment().format('YYYY-MM-DD HH:mm:ss') // const currentTime = moment().format('YYYY-MM-DD HH:mm')
await articleService.createArticle({ await articleService.createArticle({
title: inputTitle, title: inputTitle,
...@@ -51,7 +51,6 @@ router.post("/upload", upload.array("img"), async function(req, res, next) { ...@@ -51,7 +51,6 @@ router.post("/upload", upload.array("img"), async function(req, res, next) {
longitude: inputlng, longitude: inputlng,
comments: [], comments: [],
likes: [], likes: [],
createdAt: currentTime
}); });
console.log('saved.') console.log('saved.')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment