From b673a232b1768848c905df1b7ad00b233de6d4df Mon Sep 17 00:00:00 2001 From: Karl Date: Sat, 19 Jul 2025 23:13:48 +0100 Subject: [PATCH] looking for extra urls --- dockerfile | 3 +++ routes/extra_urls.py | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index 7c4d098..d7a6d49 100644 --- a/dockerfile +++ b/dockerfile @@ -33,6 +33,9 @@ ENV FLASK_APP=ktvmanager.main:create_app # Copy application code COPY . . +# Debugging step to verify file presence +RUN ls -la /app/ktvmanager/lib + # Handle versioning ARG VERSION RUN if [ -n "$VERSION" ]; then echo $VERSION > VERSION; fi diff --git a/routes/extra_urls.py b/routes/extra_urls.py index 4689787..ef0d401 100644 --- a/routes/extra_urls.py +++ b/routes/extra_urls.py @@ -57,4 +57,13 @@ def remove_extra_url(): extra_urls_list.remove(extra_url) write_extra_urls_list(extra_urls_list) - return jsonify({'message': 'Extra URL removed successfully.'}), 200 \ No newline at end of file + return jsonify({'message': 'Extra URL removed successfully.'}), 200 + +@extra_urls_bp.route('/extra_urls_file', methods=['GET']) +def get_extra_urls_file(): + """Gets the content of the extra_urls.txt file.""" + if not os.path.exists(EXTRA_URLS_FILE): + return "File not found", 404 + with open(EXTRA_URLS_FILE, 'r') as f: + content = f.read() + return Response(content, mimetype='text/plain') \ No newline at end of file