class Api::V1::Users::ProjectsController < Api::V1::BaseController 
  before_action :load_observe_user

  def index 
    @object_results = Api::V1::Users::Projects::ListService.call(@observe_user, query_params, current_user)
    @projects = kaminari_paginate(@object_results)
  end

  private 
  def query_params
    params.permit(:category, :is_public, :project_type, :sort_by, :sort_direction, :search, :start_at, :end_at)
  end
end