From f47f256536fe8e738e9efaa12c0c01683efe4688 Mon Sep 17 00:00:00 2001 From: AlGouvea Date: Fri, 18 Jun 2021 12:51:55 -0300 Subject: [PATCH] Adicionado rota para pagina da info de mesa diretora na API --- sapl/api/urls.py | 4 +++- sapl/api/views.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sapl/api/urls.py b/sapl/api/urls.py index 17fd432ab..9a8da714d 100644 --- a/sapl/api/urls.py +++ b/sapl/api/urls.py @@ -6,7 +6,7 @@ from rest_framework.routers import DefaultRouter from sapl.api.deprecated import MateriaLegislativaViewSet, SessaoPlenariaViewSet,\ AutoresProvaveisListView, AutoresPossiveisListView, AutorListView,\ ModelChoiceView -from sapl.api.views import SaplApiViewSetConstrutor, AppVersionView, recria_token +from sapl.api.views import SaplApiViewSetConstrutor, AppVersionView, recria_token, get_mesa_diretora from .apps import AppConfig @@ -72,6 +72,8 @@ urlpatterns = [ url(r'^api/', include(urlpatterns_router)), url(r'^api/version', AppVersionView.as_view()), url(r'^api/recriar-token/(?P\d*)$', recria_token, name="recria_token"), + url(r'^api/parlamentares/mesa-diretora/(?P\d*)$', + get_mesa_diretora, name='get_mesa_diretora') # implementar caminho para autenticaĆ§Ć£o # https://www.django-rest-framework.org/tutorial/4-authentication-and-permissions/ diff --git a/sapl/api/views.py b/sapl/api/views.py index f4e853ccd..5fd12408e 100644 --- a/sapl/api/views.py +++ b/sapl/api/views.py @@ -704,3 +704,6 @@ class AppVersionView(APIView): 'is_authenticated': request.user.is_authenticated, } return Response(content) + + +