api: expose meeting type duration (#25410)

This commit is contained in:
Serghei Mihai 2018-07-20 20:37:08 +02:00
parent 0ce55339a7
commit 0f34cd204c
2 changed files with 2 additions and 0 deletions

View File

@ -269,6 +269,7 @@ class MeetingList(APIView):
meeting_types.append({
'text': meeting_type.label,
'id': meeting_type.slug,
'duration': meeting_type.duration,
'api': {
'datetimes_url': request.build_absolute_uri(
reverse('api-agenda-meeting-datetimes',

View File

@ -119,6 +119,7 @@ def test_agendas_meetingtypes_api(app, some_data, meetings_agenda):
assert resp.json == {'data': [
{'text': 'Blah',
'id': 'blah',
'duration': 30,
'api': {
'datetimes_url': 'http://testserver/api/agenda/foo-bar-meeting/meetings/blah/datetimes/',
}