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/users/users_api.rb

30 lines
560 B

module API
module V3
module Users
class UsersAPI < Grape::API
resources :users do
params do
requires :id, desc: 'User\'s id'
end
namespace ':id' do
before do
@user = User.find(params[:id])
model = ::API::V3::Users::UserModel.new(@user)
@representer = ::API::V3::Users::UserRepresenter.new(model)
end
get do
@representer.to_json
end
end
end
end
end
end
end