Read cards endpoint uri from env

This commit is contained in:
Madis Mägi 2023-07-30 13:17:14 +03:00
parent e7a0496f4e
commit 63a8b9e5f7
2 changed files with 3 additions and 1 deletions

View File

@ -11,6 +11,7 @@ app = Sanic(__name__)
monitor(app).expose_endpoint()
DOORBOY_SECRET = os.environ["DOORBOY_SECRET"]
CARD_URI = os.environ["CARD_URI"]
CARD_KUBE_GROUP = os.environ["CARD_KUBE_GROUP"]
MONGO_URI = os.getenv("MONGO_URI",
"mongodb://127.0.0.1:27017/default?replicaSet=rs0")
@ -30,7 +31,7 @@ async def view_doorboy_uids(request):
return text("how about no")
async with httpx.AsyncClient() as client:
r = await client.get("https://inventory-app-72zn4.codemowers.ee/cards", params={
r = await client.get(CARD_URI, params={
"group": CARD_KUBE_GROUP
})
j = r.json()

View File

@ -26,5 +26,6 @@ services:
environment:
DOORBOY_SECRET: "0123456789"
CARD_KUBE_GROUP: "codemowers:admins"
CARD_URI: "https://inventory-app-72zn4.codemowers.ee/cards"
build:
context: .