initial commit
This commit is contained in:
35
core/apps/accounts/urls.py
Normal file
35
core/apps/accounts/urls.py
Normal file
@@ -0,0 +1,35 @@
|
||||
"""
|
||||
Accounts app urls
|
||||
"""
|
||||
|
||||
from django.urls import path, include
|
||||
from rest_framework_simplejwt import views as jwt_views
|
||||
from .views import (
|
||||
RegisterView,
|
||||
ResetPasswordView,
|
||||
MeView,
|
||||
ChangePasswordView,
|
||||
MeCompanyView,
|
||||
)
|
||||
from rest_framework.routers import DefaultRouter # type: ignore
|
||||
|
||||
|
||||
router = DefaultRouter()
|
||||
router.register("auth", RegisterView, basename="auth") # type: ignore
|
||||
router.register("auth", ResetPasswordView, basename="reset-password") # type: ignore
|
||||
router.register("auth", MeView, basename="me") # type: ignore
|
||||
router.register("auth", ChangePasswordView, basename="change-password") # type: ignore
|
||||
|
||||
router.register(r"me/companies", MeCompanyView, "me-company") # type: ignore
|
||||
|
||||
|
||||
urlpatterns = [ # type: ignore
|
||||
path("", include(router.urls)), # type: ignore
|
||||
path("auth/token/", jwt_views.TokenObtainPairView.as_view(), name="token_obtain_pair"),
|
||||
path("auth/token/verify/", jwt_views.TokenVerifyView.as_view(), name="token_verify"),
|
||||
path(
|
||||
"auth/token/refresh/",
|
||||
jwt_views.TokenRefreshView.as_view(),
|
||||
name="token_refresh",
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user