replace all created to timestamps: true in db

This commit is contained in:
Wentao Lyu 2023-03-13 05:20:35 +08:00
parent 5d65427a6e
commit dd1f74da72
4 changed files with 11 additions and 22 deletions

View file

@ -12,11 +12,7 @@ const promptSchema = mongoose.Schema({
category: {
type: String,
},
created: {
type: Date,
default: Date.now
}
});
}, { timestamps: true });
const Prompt = mongoose.models.Prompt || mongoose.model('Prompt', promptSchema);