This commit is contained in:
behruz-dev
2025-11-11 19:43:46 +05:00
parent 5626269999
commit c54886d586
17 changed files with 161 additions and 6 deletions

View File

@@ -0,0 +1,18 @@
from rest_framework import generics
from rest_framework.response import Response
from rest_framework.permissions import IsAuthenticated
from core.apps.shared.utils.response import success_message, error_message
from core.apps.shared.serializers.contact_us import ContactUsSerializer
from core.apps.shared.models import ContactUs
class ContactUsApiView(generics.GenericAPIView):
permission_classes = [IsAuthenticated]
queryset = ContactUs.objects.first()
serializer_class = ContactUsSerializer
def get(self, request):
obj = ContactUs.objects.first()
serializer = self.serializer_class(obj)
return Response(serializer.data, status=200)