from flask import request, Response
from db.repository import Repository

repo = Repository()

def get_conn_clusters():
    ''' Gets connected_clusters from the database.

        :returns: Returns similarity objects from the DB
        :rtype: Dict
    '''  
    result = repo.get_connected_clusters()
    if result is None or len(result) == 0:        
        print("MongoDb Get Error: Response 404")
        return Response(status=404)
    else:

        return result
