[server]: Update return_all_data to make it easier to test
This commit is contained in:
@ -4,10 +4,10 @@ import boto3
|
|||||||
from boto3.dynamodb.conditions import Key, Attr
|
from boto3.dynamodb.conditions import Key, Attr
|
||||||
|
|
||||||
dynamodb = boto3.resource('dynamodb')
|
dynamodb = boto3.resource('dynamodb')
|
||||||
table = dynamodb.Table(os.environ['TABLE_NAME'])
|
|
||||||
|
|
||||||
|
|
||||||
def lambda_handler(event, context):
|
def lambda_handler(event, context):
|
||||||
|
table = dynamodb.Table(os.environ['TABLE_NAME'])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Check if objectType is present in query string parameters
|
# 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[
|
||||||
|
Reference in New Issue
Block a user