diff --git a/core/authentication/api_v2.py b/core/authentication/api_v2.py index 70e4bc1..f87e143 100644 --- a/core/authentication/api_v2.py +++ b/core/authentication/api_v2.py @@ -3,6 +3,7 @@ from rest_framework.decorators import api_view, permission_classes, authenticati from rest_framework.response import Response from rest_framework.authentication import BasicAuthentication from django.contrib.auth.models import User +from django.urls import path class UserSerializer(serializers.ModelSerializer): @@ -50,4 +51,7 @@ def registerUser(request): router = routers.SimpleRouter() router.register(r'users', UserViewSet, basename='users') -urlpatterns = router.urls +urlpatterns = router.urls + [ + path('token/', token), + path('register/', registerUser), +]