def METHOD_NAME(request):
    user_does_not_exist = False
    try:
        user = User.objects.get(username=request.user)
        name = user.username
        email = user.email
        request_data = {"name": name, "email": email}
    except User.DoesNotExist:
        request_data = request.data
        user_does_not_exist = True
    if request.method == "POST" or user_does_not_exist:
        if request.data.get("message"):
            request_data["message"] = request.data.get("message")
        serializer = ContactSerializer(data=request_data)
        if serializer.is_valid():
            serializer.save()
            response_data = {
                "message": "We have received your request and will contact you shortly."
            }
            if not settings.DEBUG:
                message = {
                    "text": "A *contact message* is received!",
                    "fields": [
                        {
                            "title": "Name",
                            "value": request.data["name"],
                            "short": True,
                        },
                        {
                            "title": "Email",
                            "value": request.data["email"],
                            "short": True,
                        },
                        {
                            "title": "Message",
                            "value": request.data["message"],
                            "short": False,
                        },
                    ],
                }
                send_slack_notification(message=message)
            return Response(response_data, status=status.HTTP_201_CREATED)
        return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
    elif request.method == "GET":
        response_data = {"name": name, "email": email}
        return Response(response_data, status=status.HTTP_200_OK)