Removed unused values from InitialStateSerializer
• Removed: - unused values from InitialStateSerializer that used redis and now are in own cached api controllers for monthly_expenses_complete, trending_hashtags
This commit is contained in:
parent
2cd09a8e72
commit
2790408a5e
|
@ -29,8 +29,6 @@ class InitialStateSerializer < ActiveModel::Serializer
|
||||||
store[:is_staff] = object.current_account.user.staff?
|
store[:is_staff] = object.current_account.user.staff?
|
||||||
store[:unread_count] = unread_count object.current_account
|
store[:unread_count] = unread_count object.current_account
|
||||||
store[:last_read_notification_id] = object.current_account.user.last_read_notification
|
store[:last_read_notification_id] = object.current_account.user.last_read_notification
|
||||||
store[:monthly_expenses_complete] = Redis.current.get("monthly_funding_amount") || 0
|
|
||||||
store[:trending_hashtags] = get_trending_hashtags
|
|
||||||
store[:is_first_session] = is_first_session object.current_account
|
store[:is_first_session] = is_first_session object.current_account
|
||||||
store[:email_confirmed] = object.current_account.user.confirmed?
|
store[:email_confirmed] = object.current_account.user.confirmed?
|
||||||
store[:email] = object.current_account.user.confirmed? ? '[hidden]' : object.current_account.user.email
|
store[:email] = object.current_account.user.confirmed? ? '[hidden]' : object.current_account.user.email
|
||||||
|
@ -79,9 +77,4 @@ class InitialStateSerializer < ActiveModel::Serializer
|
||||||
object.current_account.user.sign_in_count === 1
|
object.current_account.user.sign_in_count === 1
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_trending_hashtags
|
|
||||||
tags = Redis.current.get("admin_trending_hashtags") || ""
|
|
||||||
return tags.strip.split(", ")
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue