Skip to content

Commit 2733cbd

Browse files
Update api/index.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 20ec5d6 commit 2733cbd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

api/index.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@ def public_access(f):
4444
@wraps(f)
4545
def decorated_function(*args, **kwargs):
4646
public = os.environ.get("CODE_GRAPH_PUBLIC", "0") # Get public access setting
47-
if not public:
47+
if public != "1":
4848
return jsonify(message="Unauthorized"), 401
4949
return f(*args, **kwargs)
5050
return decorated_function
51-
5251
@app.route('/graph_entities', methods=['GET'])
5352
@token_required # Apply token authentication decorator
5453
def graph_entities():

0 commit comments

Comments
 (0)