Give inventory api key in request
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				ci/woodpecker/push/woodpecker Pipeline was successful
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	ci/woodpecker/push/woodpecker Pipeline was successful
				
			This commit is contained in:
		| @@ -10,6 +10,7 @@ import os | ||||
| app = Sanic(__name__) | ||||
| monitor(app).expose_endpoint() | ||||
|  | ||||
| INVENTORY_API_KEY = os.environ["INVENTORY_API_KEY"] | ||||
| DOORBOY_SECRET_FLOOR = os.environ["DOORBOY_SECRET_FLOOR"] | ||||
| DOORBOY_SECRET_WORKSHOP = os.environ["DOORBOY_SECRET_WORKSHOP"] | ||||
| CARD_URI = os.environ["CARD_URI"] | ||||
| @@ -43,7 +44,10 @@ async def view_doorboy_uids(request): | ||||
|     async with httpx.AsyncClient() as client: | ||||
|         r = await client.post(CARD_URI, json={ | ||||
|             "groups": [group] | ||||
|         }, headers={"Content-Type": "application/json"}) | ||||
|         }, headers={ | ||||
|             "Content-Type": "application/json", | ||||
|             "Authorization": f"Basic {INVENTORY_API_KEY}" | ||||
|         }) | ||||
|     j = r.json() | ||||
|     allowed_uids = [] | ||||
|     for obj in j: | ||||
|   | ||||
| @@ -24,6 +24,7 @@ services: | ||||
|   doorboy_proxy: | ||||
|     network_mode: host | ||||
|     environment: | ||||
|       INVENTORY_API_KEY: "sptWL6XFxl4b8" | ||||
|       DOORBOY_SECRET_FLOOR: "0123456789" | ||||
|       DOORBOY_SECRET_WORKSHOP: "9999999999" | ||||
|       FLOOR_ACCESS_GROUP: "k-space:floor" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user