Spaces:
Sleeping
Sleeping
Update data_test2.py
Browse files- data_test2.py +2 -2
data_test2.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
# Get the token from the URL
|
| 2 |
load_dotenv()
|
| 3 |
-
secret =
|
| 4 |
|
| 5 |
params = st.experimental_get_query_params()
|
| 6 |
token = params["token"][0]
|
|
@@ -22,7 +22,7 @@ companynreg = decoded["payload"]["companynreg"]
|
|
| 22 |
email = decoded["payload"]["email"]
|
| 23 |
|
| 24 |
# Connect to the database
|
| 25 |
-
cnx = mysql.connector.connect(user=
|
| 26 |
cursor = cnx.cursor()
|
| 27 |
|
| 28 |
# Get all financial data for this company
|
|
|
|
| 1 |
# Get the token from the URL
|
| 2 |
load_dotenv()
|
| 3 |
+
secret = os.environ['SECRET']
|
| 4 |
|
| 5 |
params = st.experimental_get_query_params()
|
| 6 |
token = params["token"][0]
|
|
|
|
| 22 |
email = decoded["payload"]["email"]
|
| 23 |
|
| 24 |
# Connect to the database
|
| 25 |
+
cnx = mysql.connector.connect(user=os.environ['USER'], password=os.environ['PASSWORD'], host=os.environ['HOST'], database=os.environ['DATABASE'])
|
| 26 |
cursor = cnx.cursor()
|
| 27 |
|
| 28 |
# Get all financial data for this company
|