Function updateSeasonById

  • Updates a season by given ID (if it exists).

    Season is identified by its stringified ObjectID.

    Updatable fields

    • name
    • description
    • icon

    Usage

    const seasonId: string = "9e9f99daa45c7";
    const season: Partial<Season> = {
    name: "Updated season name",
    };

    const {
    acknowledged,
    matchedCount,
    modifiedCount,
    upsertedCount,
    upsertedId,
    } = await sdk.updateSeasonById({ seasonId, season });

    Parameters

    • params: {
          seasonId: string;
          season: Partial<Omit<Season, "_id">>;
      }
      • seasonId: string

        ID of the season to be updated.

      • season: Partial<Omit<Season, "_id">>

        fields that should be changed in a season, if it exists.

    Returns Promise<UpdateResult>

Generated using TypeDoc