有2个收藏。联系人和比赛帖子
const MatchPostSchema = new Schema({
date: String,
day: String,
league: String,
city: String,
stadium: String,
address: String,
contact: String,
ethernet: String,
team_1: String,
team_2: String,
time: String,
commentator: String,
comment: String,
userid: {
type: mongoose.Schema.Types.ObjectId,
ref: 'User',
required: true,
},
datePosted:{
type: Date,
default: new Date()
},
});
这里是感兴趣的领域contact: String
和联系人集合
const contactSchema = new Schema({
surname: String,
name: String,
number: String
});
集合中的数据来自method="POST"
该数据显示在另一个页面上。如何从 matchposts 集合中捕获联系人,确定其中写入的内容并在联系人集合中找到此数据,以便在联系人页面上显示联系人集合中的联系人页面
您是否尝试过制作链接而不是字符串?