src/functions/questions_handler.rb
def obtain_questions(body)
  size = parse_number(body)
  if size > 0
    size -= 1
  end
  response = DYNAMODB.scan(table_name: TABLE_NAME)
  parse_items(response.items.shuffle[0..size])
end
# Function for obtaining the specified number of questions from the DB
Function for obtaining the specified number of questions from the DB
Function for obtaining the specified number of questions from the DB
def obtain_questions(body)
  size = parse_number(body)
  if size > 0
    size -= 1
  end
  response = DYNAMODB.scan(table_name: TABLE_NAME)
  parse_items(response.items.shuffle[0..size])
end
def obtain_questions ( body ) size = parse_number ( body ) if size > 0 size -= 1 end response = DYNAMODB . scan ( table_name : TABLE_NAME ) parse_items ( response . items . shuffle [ 0 .. size ] ) end
Function for obtaining the specified number of questions from the DB
Function for obtaining the specified number of questions from the DB
body