-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix get user and update user #13
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments. Additionally Josh may have more but this is my pass at it.
code/student/user.py
Outdated
@@ -32,35 +32,43 @@ def __init__(self, uid, name, email, linkedin, degree, majors, minors, gpa, year | |||
self.work_auth: work_auth | |||
self.sponsor: sponsor | |||
|
|||
client = boto3.client('dynamodb', region_name=os.environ.get('AWS_REGION', 'us-east-2')) | |||
dynamo_table = 'infra-resume-book-users' | |||
client = boto3.client('dynamodb', region_name='us-east-2') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should keep os environ override for region.
code/student/user.py
Outdated
|
||
def get_user(id: int) -> str | None: | ||
response = client.get_item( | ||
TableName=dynamo_table, | ||
Key={ | ||
'id': id | ||
"uin": id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is university UIN, we are not permitted to ask for this number (and we shouldn't have it anyway).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this refers to object_id in aad
No description provided.