disable /open-door-events
not in use anywhere rename to /logs
This commit is contained in:
		| @@ -14,7 +14,6 @@ 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"] | ||||
| DOORBOY_SECRET_OPEN_EVENTS = os.environ["DOORBOY_SECRET_OPEN_EVENTS"] | ||||
| CARD_URI = os.environ["CARD_URI"] | ||||
| FLOOR_ACCESS_GROUP = os.environ["FLOOR_ACCESS_GROUP"] | ||||
| WORKSHOP_ACCESS_GROUP = os.environ["WORKSHOP_ACCESS_GROUP"] | ||||
| @@ -63,11 +62,10 @@ def datetime_to_json_formatting(o): | ||||
|     if isinstance(o, (date, datetime)): | ||||
|         return o.isoformat() | ||||
|  | ||||
| @app.route("/open-door-events") | ||||
| # Only identified and successful events. **Endpoint not in use.** | ||||
| @app.route("/logs") | ||||
| async def view_open_door_events(request): | ||||
|     key = request.headers.get("KEY") | ||||
|     if not key or key != DOORBOY_SECRET_OPEN_EVENTS: | ||||
|         return text("Invalid token") | ||||
|     return text("not an admin"), 403 | ||||
|  | ||||
|     results = await app.ctx.db.eventlog.find({ | ||||
|         "component": "doorboy", | ||||
|   | ||||
| @@ -27,7 +27,6 @@ services: | ||||
|       INVENTORY_API_KEY: "sptWL6XFxl4b8" | ||||
|       DOORBOY_SECRET_FLOOR: "0123456789" | ||||
|       DOORBOY_SECRET_WORKSHOP: "9999999999" | ||||
|       DOORBOY_SECRET_OPEN_EVENTS: "1111111111" | ||||
|       FLOOR_ACCESS_GROUP: "k-space:floor" | ||||
|       WORKSHOP_ACCESS_GROUP: "k-space:workshop" | ||||
|       CARD_URI: "https://inventory-app-72zn4.codemowers.ee/cards" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user