Add description attribute to group API (GET and POST)
This commit is contained in:
parent
ada6c6080b
commit
6ac8bb0f7c
|
@ -65,7 +65,7 @@ module API
|
||||||
end
|
end
|
||||||
|
|
||||||
class Group < Grape::Entity
|
class Group < Grape::Entity
|
||||||
expose :id, :name, :path, :owner_id
|
expose :id, :name, :path, :owner_id, :description
|
||||||
end
|
end
|
||||||
|
|
||||||
class GroupDetail < Group
|
class GroupDetail < Group
|
||||||
|
|
|
@ -47,7 +47,7 @@ module API
|
||||||
authenticated_as_admin!
|
authenticated_as_admin!
|
||||||
required_attributes! [:name, :path]
|
required_attributes! [:name, :path]
|
||||||
|
|
||||||
attrs = attributes_for_keys [:name, :path]
|
attrs = attributes_for_keys [:name, :path, :description]
|
||||||
@group = Group.new(attrs)
|
@group = Group.new(attrs)
|
||||||
@group.owner = current_user
|
@group.owner = current_user
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue