From fdf71b4f9efe5f95ed2b61500226276d99fe8db5 Mon Sep 17 00:00:00 2001 From: Jish2 Date: Thu, 16 Nov 2023 21:07:59 -0600 Subject: [PATCH] test changes --- code/mapper.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/code/mapper.py b/code/mapper.py index 28c45c4..0bdee91 100644 --- a/code/mapper.py +++ b/code/mapper.py @@ -7,7 +7,7 @@ def healthzHandler(context, queryParams, body): return { "statusCode": 200, - "body": "UP" + "body": "UP!" } def notImplemented(context, queryParams, body): return { @@ -39,6 +39,14 @@ def getUploadUrl(context, queryParams, body): traceback.print_exc() return rval +def getUserId(context, queryParams, body): + return { + "statusCode": 200, + "body": json.dumps({ + "id": context['object_id'] + }) + } + def getResumeUrl(context, queryParams, body): rval = {} if not 'uid' in queryParams: @@ -50,14 +58,14 @@ def getResumeUrl(context, queryParams, body): rval = { "statusCode": 200, "body": json.dumps({ - "url": url + "url": url, }) } except: rval = serverError("Could not create S3 download URL.") traceback.print_exc() return rval - + def getUser(context, queryParams, body): rval = {} try: @@ -90,7 +98,8 @@ def updateUser(context, queryParams, body): "/api/v1/student/getUploadURL": getUploadUrl, "/api/v1/recruiter/getResumeUrl": getResumeUrl, "/api/v1/recruiter/getResumeListings": notImplemented, - "/api/v1/student": getUser + "/api/v1/student": getUser, + "/api/v1/student/id": getUserId }, "PUT": { "/api/v1/student": updateUser