class PageQuery < ApplicationQuery
  attr_reader :params

  def initialize(params, user)
    @user = user
    @params = params
  end

  def call
    pages = Page.where(user: @user).order(created_at: :desc)
    pages
  end
end