feat: implement WebADIS authentication and add medianumber retrieval functionality

This commit is contained in:
2025-10-21 15:26:20 +02:00
parent 0764a6b06a
commit f63bcc8446
12 changed files with 323 additions and 9 deletions

View File

@@ -280,6 +280,21 @@ class Database:
conn.commit()
self.close_connection(conn)
def getWebADISAuth(self) -> Tuple[str, str]:
"""
Get the WebADIS authentication data from the database
Returns:
Tuple[str, str]: The username and password for WebADIS
"""
result = self.query_db(
"SELECT username, password FROM webadis_login WHERE effective_range='SAP'",
one=True,
)
if result is None:
return ("", "")
return (result[0], result[1])
@log.catch
def query_db(
self,