From ede4ac7f6e8737be166fc36ac3c5c9c12f5f7e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Mekina?= Date: Wed, 7 May 2025 15:27:12 +0200 Subject: [PATCH] quick fixes --- client/presentationmgr.ts | 2 +- main.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/presentationmgr.ts b/client/presentationmgr.ts index 1f24a67..71d2a8b 100644 --- a/client/presentationmgr.ts +++ b/client/presentationmgr.ts @@ -78,7 +78,7 @@ class MainScreen implements PresentationScreen { const subs_cz = new ScrollingTextBox(); this.subs_english = new AsyncRunner(subs_en); this.subs_czech = new AsyncRunner(subs_cz); - this.question_insert = el.p(""); + this.question_insert = el.p("Otázka"); this.dom_question_link = el.div([el.h1(QUESTION_LINK)], ["link"]); this.dom_question = el.div([this.dom_question_link, this.question_insert], ["question"]); this.dom_root = el.div([ diff --git a/main.py b/main.py index c8c0727..85be5fd 100644 --- a/main.py +++ b/main.py @@ -28,7 +28,7 @@ from pathlib import Path from asyncio import Lock # Some useful variables -PEEHAITCHPEA_ENDPOINT = "http://localhost:9000/api.php?cmd=getselectedmessage" +PEEHAITCHPEA_ENDPOINT = "http://peehaitchpea.libre-liberec.cz/api.php?cmd=getselectedmessage" PYTHAGORAS_PORT = 8000 # Configure logging @@ -359,8 +359,9 @@ async def fetch_selected_message(): Fetches a selected message from the specified endpoint. Returns the message as a string or None if no message is available. """ + auth = httpx.BasicAuth(username="stallman", password="gnu") try: - async with httpx.AsyncClient() as client: + async with httpx.AsyncClient(auth=auth) as client: response = await client.get(PEEHAITCHPEA_ENDPOINT) if response.status_code == 200: message = response.text.strip()