Created
May 27, 2018 13:28
-
-
Save rippinrobr/739c0cf5a5680c625ed5263757ff2e9f to your computer and use it in GitHub Desktop.
A reminder of what the chained function calls look like that process the returned value from the actor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Send message to `DbExecutor` actor | |
req.state().db.send(GetConspiracy{page_id: page_id.to_owned()}) | |
.from_err() | |
.and_then(|res| { | |
match res { | |
Ok(conspiracy) => Ok(HttpResponse::Ok().json(conspiracy)), | |
Err(_) => Ok(HttpResponse::NotFound().into()) | |
} | |
}) | |
.responder() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment