in code/backend/app.py [0:0]
def update_todo(todoid):
if request.method == 'OPTIONS':
return "Endpoint Hit: createTodo method = OPTIONS\n"
elif request.method == 'POST':
params = request.get_json()
table.update_item(
Key={'TodoId': todoid},
UpdateExpression="SET title=:title, done=:done",
ExpressionAttributeValues={
":title": params['title'],
":done": params['done']
}
)
return "Updated todo\n"