Commit 949431fa authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Update API to use notification_level from notification_setting

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 26631f99
......@@ -255,14 +255,19 @@ module API
expose :id, :path, :kind
end
class ProjectAccess < Grape::Entity
class Member < Grape::Entity
expose :access_level
expose :notification_level
expose :notification_level do |member, options|
if member.notification_setting
NotificationSetting.levels[member.notification_setting.level]
end
end
end
class GroupAccess < Grape::Entity
expose :access_level
expose :notification_level
class ProjectAccess < Member
end
class GroupAccess < Member
end
class ProjectService < Grape::Entity
......
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