src/functions/score_handler.rb
def obtain_scores
  response = DYNAMODB.scan(table_name: TABLE_NAME)
  parsed_items = parse_items(response.items)
  parsed_items = parsed_items.sort_by{ |item| item['score'] }
  parsed_items.sort_by{ |item| item['date_time'] }
end
# Function that returns the scores stored in the DB
Function that returns the scores stored in the DB
Function that returns the scores stored in the DB
def obtain_scores
  response = DYNAMODB.scan(table_name: TABLE_NAME)
  parsed_items = parse_items(response.items)
  parsed_items = parsed_items.sort_by{ |item| item['score'] }
  parsed_items.sort_by{ |item| item['date_time'] }
end
def obtain_scores response = DYNAMODB . scan ( table_name : TABLE_NAME ) parsed_items = parse_items ( response . items ) parsed_items = parsed_items . sort_by { | item | item [ 'score' ] } parsed_items . sort_by { | item | item [ 'date_time' ] } end
Function that returns the scores stored in the DB
Function that returns the scores stored in the DB