From 3a60e98f155e3118793f1ec631daca66b1c1056b Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 10 Jun 2024 16:58:26 -0700 Subject: [PATCH] Try again --- api/app.py | 4 ++-- src/pages/views/homeView.tsx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/app.py b/api/app.py index 82fe7714..969adf81 100644 --- a/api/app.py +++ b/api/app.py @@ -79,7 +79,7 @@ def upload_file(): @app.route('/get-classifiers', methods=["GET"]) def get_classifiers(): - print(build_tree('../../..')) + print(build_tree('../..')) classifiers = get_available_classifiers() return jsonify(build_tree('../../..')) # should be classifiers but testing for now @@ -87,7 +87,7 @@ def build_tree(directory, indent='', d=0): """ Recursively build directory tree structure as a string. """ - if d == 2: + if d == 4: return '' tree = indent + os.path.basename(directory) + '/' + '\n' diff --git a/src/pages/views/homeView.tsx b/src/pages/views/homeView.tsx index 4876eefb..ad60840d 100644 --- a/src/pages/views/homeView.tsx +++ b/src/pages/views/homeView.tsx @@ -19,6 +19,7 @@ export default function HomeView() { while (true) { try { const response = await axios.get("http://localhost:5000/get-classifiers"); + console.log(response); setClassifiers(response.data); setIsBackendAvailable(true); break;