def METHOD_NAME(request):
    if '/api/' in request.path:
        return JsonResponse({
            "status": "error",
            "message": "Deprecated API endpoint",
        }, status=status.HTTP_410_GONE)
    else:
        return redirect('/app/#?http_error=410')