clean up swagger
This commit is contained in:
@@ -6,7 +6,7 @@ from .serializers import *
|
||||
from .models import UserAddressModel, User, SecurityBreachAttemptModel
|
||||
from rest_framework.permissions import IsAuthenticated, AllowAny
|
||||
from drf_spectacular.utils import extend_schema, OpenApiParameter, extend_schema_view
|
||||
from rest_framework_simplejwt.views import TokenObtainPairView
|
||||
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView
|
||||
from django.shortcuts import get_object_or_404, redirect
|
||||
from rest_framework_simplejwt.tokens import RefreshToken
|
||||
import ghasedak_sms
|
||||
@@ -65,6 +65,12 @@ Code: {otp}"""
|
||||
except Exception as e:
|
||||
return Response({'detail': f'error: {e} مشتی فعلا برو تو غمت نباشه تا بعدا یه کاریش بکنم', 'otp_code': otp}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
|
||||
# return Response({'detail': f'An error occurred: {e}'}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
|
||||
@extend_schema_view(
|
||||
post=extend_schema(tags=['authentication'])
|
||||
)
|
||||
class TokenRefreshView(TokenRefreshView):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
class CustomTokenObtainPairView(TokenObtainPairView):
|
||||
|
||||
Reference in New Issue
Block a user