Skip to content

Commit

Permalink
Fix timeout parsing error in payment REST API.
Browse files Browse the repository at this point in the history
  • Loading branch information
scx1332 authored Aug 27, 2024
1 parent 039a743 commit fcfc1d5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,9 @@ ya-service-api-interfaces = { path = "core/serv-api/interfaces" }
ya-service-api-web = { path = "core/serv-api/web" }

## CLIENT
ya-client = { git = "https://github.com/golemfactory/ya-client.git", rev = "a2fa0d54fe47a013add90b7ae687afe4f08ce7a2" }
ya-client = { git = "https://github.com/golemfactory/ya-client.git", rev = "fbb15b49f8b9635cf3c3e2351ba6a9879f3b62d1" }
#ya-client = { path = "../ya-client" }
ya-client-model = { git = "https://github.com/golemfactory/ya-client.git", rev = "a2fa0d54fe47a013add90b7ae687afe4f08ce7a2" }
ya-client-model = { git = "https://github.com/golemfactory/ya-client.git", rev = "fbb15b49f8b9635cf3c3e2351ba6a9879f3b62d1" }
#ya-client-model = { path = "../ya-client/model" }
golem-certificate = { git = "https://github.com/golemfactory/golem-certificate.git", rev = "f2d7514c18fc066e9cfb796090b90f5b27cfe1c6" }

Expand Down
11 changes: 4 additions & 7 deletions core/payment/src/api/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ async fn get_payments(
id: Identity,
) -> HttpResponse {
let node_id = id.identity;
let timeout_secs = query
.event_params
.timeout
.unwrap_or(params::DEFAULT_EVENT_TIMEOUT);
let after_timestamp = query.event_params.after_timestamp.map(|d| d.naive_utc());
let timeout_secs = query.timeout.unwrap_or(params::DEFAULT_EVENT_TIMEOUT);
let after_timestamp = query.after_timestamp.map(|d| d.naive_utc());
let network = match query
.network
.as_ref()
Expand All @@ -53,8 +50,8 @@ async fn get_payments(
Ok(driver) => driver,
Err(e) => return response::server_error(&e),
};
let max_events = query.event_params.max_events;
let app_session_id = &query.event_params.app_session_id;
let max_events = query.max_events;
let app_session_id = &query.app_session_id;

let dao: PaymentDao = db.as_dao();
let getter = || async {
Expand Down

0 comments on commit fcfc1d5

Please sign in to comment.