Skip to content

Commit

Permalink
refactor: simplify srv usage
Browse files Browse the repository at this point in the history
  • Loading branch information
pjenvey committed Jul 30, 2019
1 parent abbd625 commit 1086de7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions autopush/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -856,13 +856,11 @@ where

let uaid = webpush.uaid;
let message_month = webpush.message_month.clone();
let srv = data.srv.clone();
let srv = &data.srv;
let fut = match srv.make_endpoint(&uaid, &channel_id, key.clone()) {
Ok(endpoint) => {
data.srv
.ddb
.register(&uaid, &channel_id, &message_month, &endpoint)
}
Ok(endpoint) => srv
.ddb
.register(&uaid, &channel_id, &message_month, &endpoint),
Err(_) => Box::new(future::ok(RegisterResponse::Error {
error_msg: "Failed to generate endpoint".to_string(),
status: 400,
Expand Down

0 comments on commit 1086de7

Please sign in to comment.