Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
fix: change response and remove hash helper
Browse files Browse the repository at this point in the history
  • Loading branch information
MartijnvDijk committed Jul 17, 2024
1 parent 1352220 commit ec759c7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/api/InzageLambdaFunction/handler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import json
from datetime import datetime
from Shared.helpers import hashHelper, logApiCall
from Shared.responses import badRequestResponse, notFoundResponse, successResponse
Expand All @@ -13,9 +14,14 @@ def handle_request(event, table):
if(params.get('method') == 'GET' and params.get('resource') == '/verwerkte-objecten'):
logApiCall('GET', '/verwerkte-objecten')

msg = get_verwerkings_acties()
msg = get_verwerkings_acties(event, table)

return successResponse(msg)
return {
'statusCode': 200,
'body': json.dumps(msg),
'headers': {
"Content-Type": "application/json",
}}

if(params.get('method') == 'GET' and params.get('resource') =='/verwerkte-objecten/{verwerktObjectId}'):
logApiCall('GET', '/verwerkte-objecten/\{verwerkteObjectId\}')
Expand Down Expand Up @@ -47,7 +53,7 @@ def get_verwerkteobjecten_verwerktobjectid(event, table):

# Get verwerkingsacties based on given filter parameters
def get_verwerkings_acties(event, table):
hashedObjectId = hashHelper(event.get('queryStringParameters').get('objectId'))
hashedObjectId = event.get('queryStringParameters').get('objectId')
object_key = event.get('queryStringParameters').get('objectType') + event.get(
'queryStringParameters').get('soortObjectId') + hashedObjectId

Expand Down

0 comments on commit ec759c7

Please sign in to comment.