mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-30 18:47:51 +00:00 
			
		
		
		
	chore: Remove pagination from macros listing api (#6419)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
This commit is contained in:
		| @@ -38,10 +38,10 @@ class Macro < ApplicationRecord | |||||||
|     self.visibility = :personal if user.agent? |     self.visibility = :personal if user.agent? | ||||||
|   end |   end | ||||||
|  |  | ||||||
|   def self.with_visibility(user, params) |   def self.with_visibility(user, _params) | ||||||
|     records = Current.account.macros.global |     records = Current.account.macros.global | ||||||
|     records = records.or(personal.where(created_by_id: user.id)) |     records = records.or(personal.where(created_by_id: user.id)) | ||||||
|     records.order(:id).page(current_page(params)) |     records.order(:id) | ||||||
|   end |   end | ||||||
|  |  | ||||||
|   def self.current_page(params) |   def self.current_page(params) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Fayaz Ahmed
					Fayaz Ahmed