Add description attribute to group API (GET and POST)

This commit is contained in:
Daniel Serodio 2014-12-16 20:03:28 -02:00
parent ada6c6080b
commit 6ac8bb0f7c
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ module API
end
class Group < Grape::Entity
expose :id, :name, :path, :owner_id
expose :id, :name, :path, :owner_id, :description
end
class GroupDetail < Group

View File

@ -47,7 +47,7 @@ module API
authenticated_as_admin!
required_attributes! [:name, :path]
attrs = attributes_for_keys [:name, :path]
attrs = attributes_for_keys [:name, :path, :description]
@group = Group.new(attrs)
@group.owner = current_user