accounts/apps/users/urls.py
Sayyid Hamid Mahdavi 565f7a298f current avatar url
2025-03-11 14:06:09 +03:30

20 lines
1.1 KiB
Python

from django.urls import path
from django.contrib.auth.views import LogoutView
from .views import UserListView, UserDetailView, AccountView, RequestOTPView, ChangePasswordView, \
OTPLoginView, ProfileDetailView, ProfileUpdateView, RequestOTTView, UserCurrentAvatarUrlView
app_name = "users"
urlpatterns = [
path('login/', OTPLoginView.as_view(), name='login'),
path('logout/', LogoutView.as_view(), name='logout'),
path('account/', ProfileDetailView.as_view(), name='account_detail'),
path('account/update/', ProfileUpdateView.as_view(), name='account_update'),
path('api/account/', AccountView.as_view(), name='account_api'),
path('api/users/', UserListView.as_view(), name='user_list_api'),
path('api/users/<uuid>/', UserDetailView.as_view(), name='user_detail_api'),
path('api/users/<uuid>/avatar', UserCurrentAvatarUrlView.as_view(), name='user_avatar_api'),
path('api/request_otp/', RequestOTPView.as_view(), name='request_otp_api'),
path('api/request_ott/', RequestOTTView.as_view(), name='request_ott_api'),
path('api/change_password/', ChangePasswordView.as_view(), name='change_password_api'),
]