added endpoints for user profile

This commit is contained in:
afanasyev.aa 2025-07-15 00:58:31 +09:00
parent dd99c395a0
commit 6f4282d96e
4 changed files with 138 additions and 5 deletions

View file

@ -10,7 +10,12 @@ from .views import (
login_view,
logout_view,
SessionView,
WhoAmIView
WhoAmIView,
UserProfileView,
ChangePasswordView,
TokenManagementView,
DeleteUserDataView,
DeleteAccountView
)
@ -32,7 +37,12 @@ urlpatterns = [
path('csrf/', get_csrf, name='api-csrf'),
path('login/', login_view, name='api-login'),
path('logout/', logout_view, name='api-logout'),
path('session/', SessionView.as_view(), name='api-session'), # new
path('whoami/', WhoAmIView.as_view(), name='api-whoami'), # new
path('session/', SessionView.as_view(), name='api-session'),
path('whoami/', WhoAmIView.as_view(), name='api-whoami'),
path("profile/", UserProfileView.as_view(), name='api-profile'),
path("profile/change-password/", ChangePasswordView.as_view(), name='api-change-password'),
path("profile/token/", TokenManagementView.as_view(), name='api-token'),
path("profile/delete-data/", DeleteUserDataView.as_view(), name='api-delete-data'),
path("profile/delete-account/", DeleteAccountView.as_view(), name='api-delete-account'),
]
urlpatterns += router.urls