Read cards endpoint uri from env
This commit is contained in:
		| @@ -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() | ||||
|   | ||||
| @@ -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: . | ||||
|   | ||||
		Reference in New Issue
	
	Block a user