feature flag for testing

This commit is contained in:
Beverly Nguyen
2024-10-31 12:04:26 -07:00
parent e09eabd8ae
commit 109f3d9992
2 changed files with 50 additions and 25 deletions

View File

@@ -2,7 +2,15 @@ import os
import secrets
from urllib.parse import unquote
from flask import abort, current_app, redirect, render_template, request, url_for
from flask import (
abort,
current_app,
jsonify,
redirect,
render_template,
request,
url_for,
)
from flask_login import current_user
from app import redis_client, status_api_client
@@ -30,6 +38,13 @@ def check_guidance_feature():
abort(404)
@main.route("/test/feature-flags")
def test_feature_flags():
return jsonify({
"FEATURE_BEST_PRACTICES_ENABLED": current_app.config["FEATURE_BEST_PRACTICES_ENABLED"]
})
@main.route("/")
def index():
if current_user and current_user.is_authenticated: