HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/unlimited-leads/Unlimited-Leads-Be/authorization/urls.py
from drf_yasg.utils import swagger_auto_schema
from drf_yasg import openapi
from django.urls import path
from rest_framework_simplejwt.views import TokenRefreshView
from rest_framework import status

from .views import (
    LoginUserView,
    LoginAdminView,
    SignupUserView,
    VerifyAccountView,
    ForgetPasswordView,
)


token_refresh_view = swagger_auto_schema(
    operation_summary="To obtain Refresh Token",
    tags=["Auth"],
    method="post",
    responses={
        status.HTTP_200_OK: openapi.Response(
            description="",
            schema=openapi.Schema(
                type=openapi.TYPE_OBJECT,
                properties={"access": openapi.Schema(type=openapi.TYPE_STRING)},
            ),
        )
    },
)(TokenRefreshView.as_view())


urlpatterns = [
    path("signup/", SignupUserView.as_view(), name="signup"),
    path("login/", LoginUserView.as_view(), name="login"),
    path("admin/login/", LoginAdminView.as_view(), name="login_admin"),
    path("token/refresh/", token_refresh_view, name="token_refresh"),
    path("verify/", VerifyAccountView.as_view(), name="verify_account"),
    path("forget-password/", ForgetPasswordView.as_view(), name="forget_password"),
]