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: report_templates_controller.rb
    path of file: ./repos/bootcamp/app/controllers/api
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class API::ReportTemplatesController < API::BaseController
  before_action 
    
  def create
    @template = ReportTemplate.new(report_template_params)
    @template.user = current_user
    if @template.save
      render json: { id: @template.id }, status: :ok
    else
      head :bad_request
    end