updateAuction
To update an auction.
Note
- Only auction which are not started yet, can be updated.
- Only auction creator can update the auction.
- Only name, description and category can updated.
On success, returns updated auction.
Usage
updateAuction(auction_id, auctionUpdates);
Parameters
auction_id: String
auctionUpdates: Object, contains the fields to be updated.
auctionUpdates = { name: String, description: String, category: String }
Example
const auction_id = "80C4AB98-08B8-16D1-0000-000000000000";
const auctionUpdates = {
name: "updated name",
description: "updated auction description",
category: "digital art",
};
const updatedAuction = await bauctionInstance.updateAuction(
auction_id,
auctionUpdates
); //returns updated auction