Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -20,8 +20,12 @@ dynamodb = boto3.resource(
|
|
20 |
table = dynamodb.Table('ChatbotConversations')
|
21 |
|
22 |
original_allowed_usernames = os.getenv('ALLOWED_NAMES')
|
|
|
|
|
|
|
23 |
allowed_usernames = json.loads(original_allowed_usernames)
|
24 |
|
|
|
25 |
def is_valid_username(username):
|
26 |
return username in allowed_usernames
|
27 |
|
|
|
20 |
table = dynamodb.Table('ChatbotConversations')
|
21 |
|
22 |
original_allowed_usernames = os.getenv('ALLOWED_NAMES')
|
23 |
+
original_allowed_usernames = original_allowed_usernames.strip()
|
24 |
+
|
25 |
+
# JSON νμ±μ μνν©λλ€.
|
26 |
allowed_usernames = json.loads(original_allowed_usernames)
|
27 |
|
28 |
+
|
29 |
def is_valid_username(username):
|
30 |
return username in allowed_usernames
|
31 |
|