chore: Get all notification API improvments (#8549)

Co-authored-by: Sojan Jose <sojan@chatwoot.com>
This commit is contained in:
Muhsin Keloth
2024-01-17 09:02:18 +05:30
committed by GitHub
parent e67f8824d9
commit 818424259f
10 changed files with 176 additions and 31 deletions

View File

@@ -153,13 +153,6 @@ class User < ApplicationRecord
mutations_from_database.changed?('email')
end
def notifications_meta(account_id)
{
unread_count: notifications.where(account_id: account_id, read_at: nil).count,
count: notifications.where(account_id: account_id).count
}
end
private
def remove_macros