diff options
-rw-r--r-- | app/serializers/note_entity.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/serializers/note_entity.rb b/app/serializers/note_entity.rb index 4ccf0bca476..9826ffb7156 100644 --- a/app/serializers/note_entity.rb +++ b/app/serializers/note_entity.rb @@ -1,5 +1,6 @@ class NoteEntity < API::Entities::Note include RequestAwareEntity + include NotesHelper expose :type @@ -57,6 +58,10 @@ class NoteEntity < API::Entities::Note end end + expose :noteable_note_url do |note| + noteable_note_url(note) + end + expose :resolve_path, if: -> (note, _) { note.part_of_discussion? && note.resolvable? } do |note| resolve_project_merge_request_discussion_path(note.project, note.noteable, note.discussion_id) end |