Cloud function not updating rows in table

Moralis.Cloud.beforeSave("ClosedAuctions", async (request) => {
   
   const logger = Moralis.Cloud.getLogger();
  const AuctionBids = Moralis.Object.extend("AuctionItemBids");

    
    const bidQuery = new Moralis.Query("AuctionItemBids");   //   problem area
    bidQuery.equalTo("uid", request.object.get('uid'));                //
    const bidObject = await bidQuery.find();                               //
                                                                                               //
    for (let i = 0; i < bidObject.length; ++i){                            //                
      let auctionBid = new AuctionBids();                                //            
       bidObject[i].set('auctionStatus', "closed");                      //                      
      auctionBid.push(bidObject[i]);                                         //   
       await auctionBid.save();                                                //
    }                                                                                        //
    
  
    const query = new Moralis.Query("ItemsForAuction");
    query.equalTo("uid", request.object.get('uid'));
    const object = await query.first();
    if (object){
        const buyer = request.object.buyer;
        const userQuery = new Moralis.Query(Moralis.User);
        userQuery.equalTo("accounts", buyer);
      const userObject = await userQuery.first({useMasterKey:true});
      if (userObject){
          request.object.set('user', userObject);
      }
      request.object.set('auctionItem', object);
      object.set('closed', true);
      await object.save();
    }
  });

I have it saving the auctionItem pointer just struggling with updating the AuctionItemBids Table i want to set a status on all rows that match the uid

got it working changing
auctionBid.push(bidObject[i]);
to
auctionBid = bidObject[i];

Thanks for the update. Will definitely help other developers as well!

Happy BUIDling! :man_mechanic: