feat: implement WebADIS authentication and add medianumber retrieval functionality
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user