"""Webapp urls."""

from django.conf.urls import url, include
from rest_framework import routers
from rest_framework_jwt.views import obtain_jwt_token, verify_jwt_token
from webapp.views import about_view, nginx_jwt_resp


from webapp.views import *


class APIRouter(routers.DefaultRouter):
    APIRootView = RootView


router = APIRouter()
router.register(r'events', EventViewSet)
router.register(r'signupForm', SignupFormViewSet)
router.register(r'signup', SignupViewSet)
router.register(r'feed', FeedViewSet)
router.register(r'contacts', ContactsViewSet)
router.register(r'committees', CommitteeViewSet)
router.register(r'questions', SavedQuestionsViewSet)
router.register(r'tags', TagsViewSet)

urlpatterns = [
    url(r'^api/', include(router.urls)),
    url(r'^api/api-token-auth/', obtain_jwt_token),
    url(r'^api/api-token-verify/', verify_jwt_token),
    # git revision
    url(r'^about', about_view),
    url(r'^jwt_nginx', nginx_jwt_resp),
]
