HiPhone_BE/user/urls.py
2023-05-03 14:45:06 +09:00

21 lines
414 B
Python

from django.conf import settings
from django.urls import path
from rest_framework import routers
from .views import login_view, logout_view
from .viewsets import UserViewset
if settings.DEBUG:
router = routers.DefaultRouter()
else:
router = routers.SimpleRouter()
router.register("users", UserViewset)
urlpatterns = router.urls + [
path("login/", login_view),
path("logout/", logout_view),
]