lugiiing commited on
Commit
a766b1d
β€’
1 Parent(s): 3884851

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
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