Function updateAwardById

  • Updates an award by given ID.

    Award is identified by its stringified ObjectID.

    Updatable fields

    • name
    • description
    • img
    • category
    • requirements
    • children
    • isStackable
    • isEnabled
    • isLegacy

    Usage

    const awardId: string = "5f5e555d5a578b6";
    const award: Partial<Award> = {
    name: "Sadoveteran",
    };

    const {
    acknowledged,
    matchedCount,
    modifiedCount,
    upsertedCount,
    upsertedId,
    } = await sdk.updateAwardById({ awardId, award });

    Parameters

    • params: {
          awardId: string;
          award: Partial<Omit<Award, "_id">>;
      }
      • awardId: string

        ID of the award to update.

      • award: Partial<Omit<Award, "_id">>

        Fields to update in the award of given ID.

    Returns Promise<UpdateResult>

Generated using TypeDoc