forgot password and email verification

This commit is contained in:
jain
2023-06-24 18:17:32 +05:30
parent 8bc3a307c0
commit 89982f851f
10 changed files with 226 additions and 11 deletions

View File

@ -4,7 +4,8 @@ from django.urls import path, include
from rest_framework.decorators import api_view
"""Third party import"""
from rest_framework import routers
from .views import UserLogin, SendPhoneOtp, UserPhoneVerification, UserEmailVerification, ReSendEmailOtp
from .views import (UserLogin, SendPhoneOtp, UserPhoneVerification, UserEmailVerification, ReSendEmailOtp,
ForgotPasswordAPIView, ResetPasswordAPIView)
"""Router"""
router = routers.SimpleRouter()
@ -15,6 +16,9 @@ router.register('send-phone-otp', SendPhoneOtp, basename='send-phone-otp')
router.register('user-phone-verification', UserPhoneVerification, basename='user-phone-verification')
router.register('user-email-verification', UserEmailVerification, basename='user-email-verification')
router.register('resend-email-otp', ReSendEmailOtp, basename='resend-email-otp')
urlpatterns = [
path('api/v1/', include(router.urls)),
path('api/v1/forgot-password/', ForgotPasswordAPIView.as_view()),
path('api/v1/reset-password/', ResetPasswordAPIView.as_view())
]