Browse Source

Adicionado rota para pagina da info de mesa diretora na API

issue#3396
AlGouvea 4 years ago
parent
commit
f47f256536
  1. 4
      sapl/api/urls.py
  2. 3
      sapl/api/views.py

4
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<pk>\d*)$', recria_token, name="recria_token"),
url(r'^api/parlamentares/mesa-diretora/(?P<pk>\d*)$',
get_mesa_diretora, name='get_mesa_diretora')
# implementar caminho para autenticação
# https://www.django-rest-framework.org/tutorial/4-authentication-and-permissions/

3
sapl/api/views.py

@ -704,3 +704,6 @@ class AppVersionView(APIView):
'is_authenticated': request.user.is_authenticated,
}
return Response(content)

Loading…
Cancel
Save