I need help with mongoose
please.
I would like to modify in an object, but I don't know how to do it.
Can someone help me please?
PS : ActorId
return 1
I have tried :
const user = await userModel.updateOne({ ActorId: ActorId }, { "Mood.FigureAnimation": request.mood.FigureAnimation, "Mood.FaceAnimation": request.mood.FaceAnimation, "Mood.MouthAnimation": request.mood.MouthAnimation, "Mood.MoodText": request.mood.TextLine });
Here is my request :
{
mood: {
ActorId: 1,
FigureAnimation: 'stand',
FaceAnimation: 'neutral',
MouthAnimation: 'none',
TextLine: 'hello',
SpeechLine: false
},
TicketHeader: {
Ticket: '1,1621847572744,SECRET'
}
}
Here is my Shema :
Mood: {
FigureAnimation: String,
FaceAnimation: String,
MouthAnimation: String,
TextLine: String
}
Thank you in advance for your answer!