|
|
@@ -26,6 +26,8 @@ load_dotenv()
|
|
|
# Configuration
|
|
|
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
|
|
PORT = int(os.getenv("PORT", 6001))
|
|
|
+
|
|
|
+EXCLUDED_BEER_IDS = [14, 12, 11];
|
|
|
# SECRET_KEY is crucial for signing session cookies.
|
|
|
# Fallback to a default if not set, but warn that this is insecure for production.
|
|
|
SECRET_KEY = os.getenv("SECRET_KEY", "your_very_very_secret_key_for_signing_cookies_python_v2")
|
|
|
@@ -139,7 +141,7 @@ def load_bg_data() -> List[Dict[str, str]]:
|
|
|
def load_products() -> List[Dict[str, str]]:
|
|
|
try:
|
|
|
with open(PRODUCTS_PATH, 'r', encoding='utf-8') as f:
|
|
|
- return json.load(f)
|
|
|
+ return list(filter(lambda product: product['id'] not in EXCLUDED_BEER_IDS, json.load(f)))
|
|
|
except FileNotFoundError:
|
|
|
print(f"ERROR: Data file not found at {PRODUCTS_PATH}. Serving with empty data.")
|
|
|
return []
|