Skip to content

Commit

Permalink
test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jish2 committed Nov 17, 2023
1 parent 895ce33 commit fdf71b4
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions code/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def healthzHandler(context, queryParams, body):
return {
"statusCode": 200,
"body": "UP"
"body": "UP!"
}
def notImplemented(context, queryParams, body):
return {
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fdf71b4

Please sign in to comment.