Example #1
0
def bulk_import_annotations(P, req):
    uid = UR.getUserId(req)
    if not auth.canImportAnnotation(uid, P["from_source_id"],
                                    P["to_source_id"]):
        return UR.prepare_response({}, 1, "NOT ALLOWED")
    return UR.prepare_response(
        annotations.bulkImportAnnotations(P["from_source_id"],
                                          P["to_source_id"], P["locs_array"],
                                          P["import_type"]))
Example #2
0
def bulk_import_annotations(P, req):
    uid = UR.getUserId(req)
    if not auth.canImportAnnotation(uid, P["from_source_id"], P["to_source_id"]):
        return UR.prepare_response({}, 1, "NOT ALLOWED")
    return UR.prepare_response( annotations.bulkImportAnnotations(P["from_source_id"], P["to_source_id"], P["locs_array"], P["import_type"]))