Change online notification limit from 100 to 200.

This commit is contained in:
Martin Edenhofer 2017-10-02 14:34:34 +02:00
parent b76be9eebc
commit c3ba2cabaf
2 changed files with 4 additions and 4 deletions

View file

@ -48,11 +48,11 @@ curl http://localhost/api/v1/online_notifications.json -v -u #{login}:#{password
def index def index
if params[:full] if params[:full]
render json: OnlineNotification.list_full(current_user, 100) render json: OnlineNotification.list_full(current_user, 200)
return return
end end
notifications = OnlineNotification.list(current_user, 100) notifications = OnlineNotification.list(current_user, 200)
model_index_render_result(notifications) model_index_render_result(notifications)
end end
@ -146,7 +146,7 @@ curl http://localhost/api/v1/online_notifications/mark_all_as_read -v -u #{login
=end =end
def mark_all_as_read def mark_all_as_read
notifications = OnlineNotification.list(current_user, 100) notifications = OnlineNotification.list(current_user, 200)
notifications.each do |notification| notifications.each do |notification|
if !notification['seen'] if !notification['seen']
OnlineNotification.seen( id: notification['id'] ) OnlineNotification.seen( id: notification['id'] )

View file

@ -11,7 +11,7 @@ module ExtraCollection
assets = item.assets(assets) assets = item.assets(assets)
} }
collections[ OnlineNotification.to_app_model ] = OnlineNotification.list(user, 100) collections[ OnlineNotification.to_app_model ] = OnlineNotification.list(user, 200)
assets = ApplicationModel.assets_of_object_list(collections[ OnlineNotification.to_app_model ], assets) assets = ApplicationModel.assets_of_object_list(collections[ OnlineNotification.to_app_model ], assets)
collections[ RecentView.to_app_model ] = RecentView.list(user, 10) collections[ RecentView.to_app_model ] = RecentView.list(user, 10)