Skip to content
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

Merged
merged 6 commits into from
Nov 17, 2023
Merged

Fix get user and update user #13

merged 6 commits into from
Nov 17, 2023

Conversation

cliarie
Copy link
Collaborator

@cliarie cliarie commented Nov 1, 2023

No description provided.

@cliarie cliarie requested a review from a team November 1, 2023 19:42
@cliarie cliarie temporarily deployed to AWS DEV November 1, 2023 19:42 — with GitHub Actions Inactive
Copy link
Contributor

@devksingh4 devksingh4 left a 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.

@@ -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')
Copy link
Contributor

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.


def get_user(id: int) -> str | None:
response = client.get_item(
TableName=dynamo_table,
Key={
'id': id
"uin": id
Copy link
Contributor

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).

Copy link
Member

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

test.json Show resolved Hide resolved
test.json Show resolved Hide resolved
@Jish2 Jish2 temporarily deployed to AWS DEV November 2, 2023 19:41 — with GitHub Actions Inactive
@Jish2 Jish2 temporarily deployed to AWS DEV November 2, 2023 22:43 — with GitHub Actions Inactive
@Jish2 Jish2 merged commit 6f541a6 into main Nov 17, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants