예제 #1
0
def get_all(call: APICall, company_id, _):
    with translate_errors_context("retrieving users"):
        res = User.get_many(company=company_id,
                            parameters=call.data,
                            query_dict=call.data)

        call.result.data = {"users": res}
예제 #2
0
def get_all(call):
    assert isinstance(call, APICall)

    with translate_errors_context("retrieving users"):
        res = User.get_many(
            company=call.identity.company,
            parameters=call.data,
            query_dict=call.data,
            query_options=get_all_query_options,
        )

        call.result.data = {"users": res}