OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/lib/api/v3/activities/activities_api.rb

30 lines
614 B

module API
module V3
module Activities
class ActivitiesAPI < Grape::API
resources :activities do
params do
requires :id, desc: 'Activity id'
end
namespace ':id' do
before do
@activity = Journal.find(params[:id])
model = ::API::V3::Activities::ActivityModel.new(journal: @activity)
@representer = ::API::V3::Activities::ActivityRepresenter.new(model)
end
get do
@representer.to_json
end
end
end
end
end
end
end