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

class API::Products::SelfAssignedController < API::BaseController
  before_action :require_staff_login_for_api
  def index
    @target = params[:target]
    @target = 'self_assigned_all' unless target_allowlist.include?(@target)
    @products = case @target
                w
    
  def index
    @target = params[:target]
    @target = 'self_assigned_all' unless target_allowlist.include?(@target)
    @products = case @target
                when 'self_assigned_all'
                  Product.unhibernated_user_products
                         .self_assigned_product(current_user.id)
                         .unchecked
                         .list
                         .order_for_self_assigned_list
                         .page(params[:page])
                when 'self_assigned_no_replied'
                  Product.unhibernated_user_products
                         .self_assigned_no_replied_products(current_user.id)
                         .unchecked
                         .list
                         .page(params[:page])
                end