HiPhone_BE/user/urls.py

21 lines
414 B
Python
Raw Normal View History

2023-05-03 14:45:06 +09:00
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),
]