You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: webhook_deliveries_controller.rb
    path of file: ./repos/Portus/app/controllers
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# WebhookDeliveriesController manages the updates of webhook deliveries.
class WebhookDeliveriesController < ApplicationController
  respond_to :html, :js

  after_action :verify_authorize
    
  def update
    namespace = Namespace.find(params[:namespace_id])
    webhook = namespace.webhooks.find(params[:webhook_id])
    webhook_delivery = webhook.deliveries.find(params[:id])

    authorize webhook_delivery

    webhook_delivery.retrigger

    respond_to do |format|
      @webhook_delivery_serialized = API::Entities::WebhookDeliveries.represent(
        webhook_delivery,
        current_user: current_user,
        type:         :internal
      ).to_json

      format.json { render json: @webhook_delivery_serialized }
    end
  end