I am trying to set or udpate undefined (or defined) values in mongoose but I am having hard time because I need to await for the values. This code doesn't save the data, I think it is because the USER.save() executes before the values are set? How can I wait for the data to be udpated/set before saving?
const USER = await User.findById(await UserID)
USER.authToken = await authToken,
USER.displayName = await name,
USER.profilePic = await pic
await USER.save()