Skip to content

Commit

Permalink
todo: single event handler function
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushik327 authored Feb 2, 2024
1 parent 5c4b482 commit 5822add
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions backend/user_funs.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,20 @@ def update_user(netid, newRoles, newPerms):

return get_user(netid)

def lambda_handler(event, context):
method = event['httpMethod']
path = event['path']
queryParams = event["queryStringParameters"]
if not queryParams:
queryParams = {}
print(f"INFO: Processing request: method {method}, path {path}.")

## TODO: map method and path to user functions
# if method == "" and path == "":
# return update_user...
# else if...


if __name__ == "__main__":
netid = input("netid: ")
roles = input("roles: ")
Expand Down

0 comments on commit 5822add

Please sign in to comment.