[server]: Delete comments to test CI/CD
This commit is contained in:
@ -10,14 +10,12 @@ def lambda_handler(event, context):
|
|||||||
table = dynamodb.Table(os.environ['TABLE_NAME'])
|
table = dynamodb.Table(os.environ['TABLE_NAME'])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Check if objectType is present in query string parameters
|
|
||||||
if 'queryStringParameters' in event and event['queryStringParameters'] and 'objectType' in event[
|
if 'queryStringParameters' in event and event['queryStringParameters'] and 'objectType' in event[
|
||||||
'queryStringParameters']:
|
'queryStringParameters']:
|
||||||
# Get objectType values and split by comma if multiple values are present
|
|
||||||
objectType = event['queryStringParameters']['objectType']
|
objectType = event['queryStringParameters']['objectType']
|
||||||
object_types = objectType.split(',')
|
object_types = objectType.split(',')
|
||||||
|
|
||||||
# Fetch items matching any of the object types using a scan with FilterExpression
|
|
||||||
items = []
|
items = []
|
||||||
response = table.scan(
|
response = table.scan(
|
||||||
FilterExpression=Attr('objectType').is_in(object_types)
|
FilterExpression=Attr('objectType').is_in(object_types)
|
||||||
|
Reference in New Issue
Block a user