Commit bba2b10e authored by Nihad Abbasov's avatar Nihad Abbasov

properly paginate project events in API

parent 7277280d
......@@ -95,10 +95,7 @@ module API
# Example Request:
# GET /projects/:id/events
get ":id/events" do
limit = (params[:per_page] || 20).to_i
offset = (params[:page] || 0).to_i * limit
events =
events = paginate
present events, with: Entities::Event
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment