in api/wheel.py [0:0]
def reset_wheel(event):
"""
Resets the weights of all participants of the wheel
:param event: Lambda event containing the API Gateway request path parameter wheel_id
{
"pathParameters":
{
"wheel_id": string ID of the wheel (DDB Hash Key)
}
}
:return: response dictionary
"""
# Ensure that the wheel exists
wheel_id = event['pathParameters']['wheel_id']
wheel = Wheel.get_existing_item(Key={'id': wheel_id})
choice_algorithm.reset_wheel(wheel)