def updateQuestionCurrentAnswered()

in backend/lambda/question-service/lambda.py [0:0]


def updateQuestionCurrentAnswered(answered, current, id, channelArn):
    response = questionTable.update_item(
        Key={
            'Id': id,
            'ChannelArn': channelArn,
        },
        UpdateExpression="SET #currentAttr=:current, #answeredAttr=:answered",
        ExpressionAttributeValues={
            ':current': current,
            ':answered': answered,
        },
        ExpressionAttributeNames={
            '#currentAttr': 'Current',
            '#answeredAttr': 'Answered',
        },
        ConditionExpression="attribute_exists(Id)"
    )
    print(response)
    
    return response