Beispiel #1
0
def get_controltypes(request: Request):
    entity_type = {'sing': 'controltype', 'plur': 'controltypes'}

    params = request.query_params.multi_items()

    filter = Filter(params=params)
    xml = filter.make_entity_xml(db=request.app.db, entity_type=entity_type, base_uri=request.app.baseuri)

    return Response(content=xml)
def get_artifacts(request: Request, udf: Dict[str, str] = None):
    entity_type = {'sing': 'artifact', 'plur': 'artifacts'}

    params = request.query_params.multi_items()

    filter = Filter(params=params)
    xml = filter.make_entity_xml(db=request.app.db,
                                 entity_type=entity_type,
                                 base_uri=request.app.baseuri)

    return Response(content=xml)