title: My updated data does not reflect in even it is status 200
body: <p>I want to increase the score of a player by updating it. Here is the call.</p>
  <pre><code>const addPlayerScore = async (score, currentPlayer) =&gt; {
          try {
              const addScore = {
                  score: score,
              };
              const { data } = await fetchContext.authAxios.patch(
                  `/facilitator/add-score-player-team-one/${currentPlayer}`,
                  addScore
              );
              console.log(data.message);
          } catch (error) {
              const { data } = error.response;
              console.log(data.message);
          }
      };
  </code></pre>
  <p>the <strong>currentPlayer</strong> takes the <strong>id</strong> of player. Which I passed into the params.</p>
  <p>here is the request;</p>
  <pre><code>exports.addscoreplayerteamone = async (req, res) =&gt; {
      try {
          const { score } = req.body;
  
          const existLive = await LiveMatch.findOneAndUpdate(
              {
                  'teamOne.players._id': req.params.id,
              },
              {
                  $set: {
                      $inc: {
                          'teamOne.players.$.scores': score,
                      },
                  },
              },
              { new: true }
          );
  
          const addPlayerScore = await existLive.save();
  
          res
              .status(200)
              .send({ message: &quot;Added the player's score&quot;, addPlayerScore });
      } catch (error) {
          console.log(error);
          return res.status(400).json({
              message: 'There was a problem adding a score',
          });
      }
  };
  </code></pre>
  <p>here is the schema;</p>
  <pre><code>const mongoose = require('mongoose');
  
  const liveSchema = new mongoose.Schema(
      {
          schedule: {
              type: mongoose.Types.ObjectId,
              required: true,
          },
          user: {
              type: mongoose.Types.ObjectId,
              required: true,
          },
          teamOne: {
              teamName: {
                  type: String,
                  required: true,
                  trim: true,
                  max: 50,
              },
              players: [
                  {
                      name: {
                          type: String,
                          required: true,
                          trim: true,
                          max: 50,
                      },
                      jerseyNumber: {
                          type: String,
                          required: true,
                          trim: true,
                      },
                      scores: {
                          type: Number,
                          default: 0,
                          trim: true,
                      },
                      fouls: {
                          type: Number,
                          trim: true,
                      },
                  },
              ],
              score: {
                  type: Number,
                  trim: true,
                  default: 0,
              },
          },
          teamTwo: {
              teamName: {
                  type: String,
                  required: true,
                  trim: true,
                  max: 50,
              },
              players: [
                  {
                      name: {
                          type: String,
                          required: true,
                          trim: true,
                          max: 50,
                      },
                      jerseyNumber: {
                          type: String,
                          required: true,
                          trim: true,
                      },
                      scores: {
                          type: Number,
                          default: 0,
                          trim: true,
                      },
                      fouls: {
                          type: Number,
                          trim: true,
                      },
                  },
              ],
              score: {
                  type: Number,
                  trim: true,
                  default: 0,
              },
          },
          gameEvent: {
              type: String,
              required: true,
              enum: ['basketball', 'volleyball', 'soccer'],
          },
          winner: {
              type: String,
              trim: true,
          },
          loser: {
              type: String,
              trim: true,
          },
      },
      { timestamps: true }
  );
  
  module.exports = mongoose.model('live-match', liveSchema);
  
  </code></pre>
  <p>it returns status 200 but it does not increments the score of the player in the database nor being reflected in the frontend.</p>