From 6aaa522a6b19330adad3148e0d0f4c79c580a454 Mon Sep 17 00:00:00 2001 From: jedi Date: Sat, 9 Dec 2023 01:07:01 +0100 Subject: [PATCH] stash --- core/authentication/api_v2.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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), +]