MCPcopy Create free account
hub / github.com/dfinity/orbit / try_get_request

Function try_get_request

tests/integration/src/utils.rs:126–144  ·  view source on GitHub ↗
(
    env: &PocketIc,
    user_id: Principal,
    station_canister_id: CanisterId,
    request: RequestDTO,
)

Source from the content-addressed store, hash-verified

124}
125
126pub fn try_get_request(
127 env: &PocketIc,
128 user_id: Principal,
129 station_canister_id: CanisterId,
130 request: RequestDTO,
131) -> Result<Result<RequestDTO, ApiErrorDTO>, RejectResponse> {
132 let get_request_args = GetRequestInput {
133 request_id: request.id,
134 with_full_info: Some(false),
135 };
136 update_candid_as::<_, (Result<GetRequestResponse, ApiErrorDTO>,)>(
137 env,
138 station_canister_id,
139 user_id,
140 "get_request",
141 (get_request_args,),
142 )
143 .map(|resp| resp.0.map(|resp| resp.request))
144}
145
146pub fn get_request(
147 env: &PocketIc,

Callers 2

get_requestFunction · 0.85
system_restoreFunction · 0.85

Calls 1

mapMethod · 0.80

Tested by 1

system_restoreFunction · 0.68