mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-15 01:55:21 +00:00
50 lines
2.7 KiB
Python
50 lines
2.7 KiB
Python
""" Urls files"""
|
|
"""Django import"""
|
|
from django.urls import path, include
|
|
"""Third party import"""
|
|
from rest_framework import routers
|
|
"""Import view functions"""
|
|
from .views import (UserLogin, SendPhoneOtp, UserPhoneVerification, UserEmailVerification, ReSendEmailOtp,
|
|
ForgotPasswordAPIView, ResetPasswordAPIView, ChangePasswordAPIView, UpdateProfileImage,
|
|
GoogleLoginViewSet, SigninWithApple, ProfileAPIViewSet, UploadImageAPIViewSet,
|
|
DefaultImageAPIViewSet, DeleteUserProfileAPIViewSet, UserNotificationAPIViewSet,
|
|
UpdateUserNotificationAPIViewSet, SendSupportEmail, LogoutAPIView)
|
|
"""Router"""
|
|
router = routers.SimpleRouter()
|
|
|
|
"""API End points with router"""
|
|
router.register('user', UserLogin, basename='user')
|
|
"""super admin login"""
|
|
router.register('admin', UserLogin, basename='admin')
|
|
"""google login end point"""
|
|
router.register('google-login', GoogleLoginViewSet, basename='admin')
|
|
router.register('send-phone-otp', SendPhoneOtp, basename='send-phone-otp')
|
|
router.register('user-phone-verification', UserPhoneVerification, basename='user-phone-verification')
|
|
"""email verification end point"""
|
|
router.register('user-email-verification', UserEmailVerification, basename='user-email-verification')
|
|
"""Resend email otp end point"""
|
|
router.register('resend-email-otp', ReSendEmailOtp, basename='resend-email-otp')
|
|
"""Profile end point"""
|
|
router.register('profile', ProfileAPIViewSet, basename='profile')
|
|
"""Upload default task image end point"""
|
|
router.register('upload-default-task-image', UploadImageAPIViewSet, basename='upload-default-task-image')
|
|
"""Fetch default task image end point"""
|
|
router.register('default-task-image', DefaultImageAPIViewSet, basename='default-task-image')
|
|
"""Delete user account"""
|
|
router.register('delete', DeleteUserProfileAPIViewSet, basename='delete')
|
|
"""user account notification"""
|
|
router.register('user-notification', UserNotificationAPIViewSet, basename='user-notification')
|
|
"""update user account notification"""
|
|
router.register('update-user-notification', UpdateUserNotificationAPIViewSet, basename='update-user-notification')
|
|
"""Define url pattern"""
|
|
urlpatterns = [
|
|
path('api/v1/', include(router.urls)),
|
|
path('api/v1/forgot-password/', ForgotPasswordAPIView.as_view()),
|
|
path('api/v1/reset-password/', ResetPasswordAPIView.as_view()),
|
|
path('api/v1/change-password/', ChangePasswordAPIView.as_view()),
|
|
path('api/v1/update-profile-image/', UpdateProfileImage.as_view()),
|
|
path('api/v1/apple-login/', SigninWithApple.as_view(), name='signup_with_apple'),
|
|
path('api/v1/send-support-email/', SendSupportEmail.as_view(), name='send-support-email'),
|
|
path('api/v1/logout/', LogoutAPIView.as_view(), name='logout')
|
|
]
|