chore: Remove pagination from macros listing api (#6419)

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
This commit is contained in:
Fayaz Ahmed 2023-02-09 16:56:37 +05:30 committed by GitHub
parent e18f4aeee9
commit 53d5d2af3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,10 +38,10 @@ class Macro < ApplicationRecord
self.visibility = :personal if user.agent?
end
def self.with_visibility(user, params)
def self.with_visibility(user, _params)
records = Current.account.macros.global
records = records.or(personal.where(created_by_id: user.id))
records.order(:id).page(current_page(params))
records.order(:id)
end
def self.current_page(params)