Esempio n. 1
0
def update_relation():
    data = request.json
    db = Database()
    relation_button = RelationButton()
    relation_button.add_relation(db, data['domain'], data['range'],
                                 data['relation'])

    return {
        'output': relation_button.output_relation_plain(db),
        'relations': relation_button.get_relations(db)
    }
Esempio n. 2
0
def get_relations():
    db = Database()
    relation_button = RelationButton()

    return {'relations': relation_button.get_relations(db)}