class Api::Webhooks::ParseController < ApplicationController
  before_action :set_run, only: [:create]

  def create
    return if @run.parsed_at.present?
    @run.parse_into_db
    render :ok
  end

  private

  def set_run
    @run = Run.find_by(s3_filename: params[:s3_filename])
  rescue ActiveRecord::RecordNotFound
    render :not_found
  end
end

class Api::Webhooks::ParseController < ApplicationController
  before_action :set_run, only: [:create]

  def create
    return if @run.parsed_at.present?
    @run.parse_into_db
    head :ok
  end

  private

  def set_run
    @run = Run.find_by(s3_filename: params[:s3_filename])
  rescue ActiveRecord::RecordNotFound
    head :not_found
  end
end

Fix parse controller render issues
Fix parse controller render issues
