class Api::V1::Webhooks::Outgoing::EndpointsController

def create

POST /api/v1/teams/:team_id/webhooks/outgoing/endpoints
def create
  if @endpoint.save
    render :show, status: :created, location: [:api, :v1, @endpoint]
  else
    render json: @endpoint.errors, status: :unprocessable_entity
  end
end

def destroy

DELETE /api/v1/webhooks/outgoing/endpoints/:id
def destroy
  @endpoint.destroy
end

def index

GET /api/v1/teams/:team_id/webhooks/outgoing/endpoints
def index
end

def show

GET /api/v1/webhooks/outgoing/endpoints/:id
def show
end

def update

PATCH/PUT /api/v1/webhooks/outgoing/endpoints/:id
def update
  if @endpoint.update(endpoint_params)
    render :show
  else
    render json: @endpoint.errors, status: :unprocessable_entity
  end
end