api: open up agendas and datetimes API endpoints (#14604)
This commit is contained in:
parent
9ea37ad16d
commit
f4a7564058
|
@ -31,6 +31,8 @@ from ..agendas.models import Agenda, Event, Booking, MeetingType, TimePeriod
|
|||
|
||||
|
||||
class Agendas(GenericAPIView):
|
||||
permission_classes = ()
|
||||
|
||||
def get(self, request, agenda_identifier=None, format=None):
|
||||
response = {'data': [{
|
||||
'id': x.id,
|
||||
|
@ -48,6 +50,8 @@ agendas = Agendas.as_view()
|
|||
|
||||
|
||||
class Datetimes(GenericAPIView):
|
||||
permission_classes = ()
|
||||
|
||||
def get(self, request, agenda_identifier=None, format=None):
|
||||
try:
|
||||
agenda = Agenda.objects.get(slug=agenda_identifier)
|
||||
|
@ -76,6 +80,8 @@ datetimes = Datetimes.as_view()
|
|||
|
||||
|
||||
class MeetingDatetimes(GenericAPIView):
|
||||
permission_classes = ()
|
||||
|
||||
def get(self, request, agenda_identifier=None, meeting_identifier=None, format=None):
|
||||
try:
|
||||
if agenda_identifier is None:
|
||||
|
|
Loading…
Reference in New Issue