feat(users): add /me/ endpoint for detail/update/delete user object
This commit is contained in:
@@ -3,6 +3,8 @@ from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView
|
||||
|
||||
from apps.users.api import views
|
||||
|
||||
|
||||
|
||||
app_name = "users"
|
||||
|
||||
urlpatterns = [
|
||||
@@ -16,6 +18,12 @@ urlpatterns = [
|
||||
path("password/change/", views.ChangePasswordView.as_view(), name="change_password"),
|
||||
path("profile/picture/", views.ProfilePictureView.as_view(), name="profile_picture"),
|
||||
path("list/", views.UserListView.as_view(), name="user_list"),
|
||||
path('me/', views.UserProfileViewSet.as_view({
|
||||
'get': 'retrieve',
|
||||
'put': 'update',
|
||||
'patch': 'partial_update',
|
||||
'delete': 'destroy'
|
||||
}), name='user-me'),
|
||||
path("token/obtain/", TokenObtainPairView.as_view(), name="token_obtain_pair"),
|
||||
path("token/refresh/", TokenRefreshView.as_view(), name="token_refresh"),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user