changed model of post

parent 1db270d5
...@@ -12,7 +12,8 @@ const PostsSchema: Schema = new Schema<IPost>({ ...@@ -12,7 +12,8 @@ const PostsSchema: Schema = new Schema<IPost>({
}, },
image: String, image: String,
datetime: { datetime: {
type: Date type: Date,
default: Date.now()
} }
}, { }, {
versionKey: false versionKey: false
......
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