Skip to content

Commit

Permalink
🐛Decimal type 관련 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
junah201 committed Dec 17, 2023
1 parent 7a253fd commit d12e52c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
7 changes: 6 additions & 1 deletion backend/lambdas/get_config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,16 @@ def lambda_handler(event, context):
})
}

item = {
key: str(value) if isinstance(value, str) else int(value)
for key, value in response["Item"].items()
}

return {
"statusCode": "200",
"headers": {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*'
},
"body": json.dumps(response["Item"])
"body": json.dumps(item)
}
9 changes: 7 additions & 2 deletions backend/lambdas/post_config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def lambda_handler(event, context):
})
}

body = json.loads(event.get("body", "{}"))
body = event.get("body", {})

keys = ["panel_title", "cafe_name", "cafe_id",
"cafe_menu_id", "cafe_board_type"]
Expand Down Expand Up @@ -68,11 +68,16 @@ def lambda_handler(event, context):
}
)

item = {
key: str(value) if isinstance(value, str) else int(value)
for key, value in response["Item"].items()
}

return {
"statusCode": "200",
"headers": {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*'
},
"body": json.dumps(response)
"body": json.dumps(item)
}

0 comments on commit d12e52c

Please sign in to comment.