Spaces:
Running
Running
Add secret
Browse files
main.py
CHANGED
@@ -6,13 +6,18 @@ from fastapi import FastAPI, Request, Header
|
|
6 |
|
7 |
app = FastAPI()
|
8 |
|
9 |
-
|
|
|
|
|
|
|
10 |
# This is a terrible idea, only used for demo purposes!
|
11 |
app.state.stripe_customer_id = None
|
12 |
|
13 |
@app.get("/")
|
14 |
def start():
|
15 |
|
|
|
|
|
16 |
return {"Status":"Deployed"}
|
17 |
|
18 |
@app.post("/webhook")
|
|
|
6 |
|
7 |
app = FastAPI()
|
8 |
|
9 |
+
#Local on Windows.
|
10 |
+
#stripe.api_key = os.environ["STRIPE_KEY"]
|
11 |
+
#API_KEY secret.
|
12 |
+
stripe.api_key = os.getenv("STRIPE_KEY")
|
13 |
# This is a terrible idea, only used for demo purposes!
|
14 |
app.state.stripe_customer_id = None
|
15 |
|
16 |
@app.get("/")
|
17 |
def start():
|
18 |
|
19 |
+
HF_AUTH_TOKEN = os.getenv("HF_AUTH_TOKEN")
|
20 |
+
|
21 |
return {"Status":"Deployed"}
|
22 |
|
23 |
@app.post("/webhook")
|