Fix user management example
This commit is contained in:
parent
fb205cd397
commit
f0517ef0b7
|
@ -1,5 +1,6 @@
|
|||
use anyhow::*;
|
||||
use futures::{future::BoxFuture, FutureExt};
|
||||
use futures_core::future::BoxFuture;
|
||||
use futures_util::FutureExt;
|
||||
use log::LevelFilter;
|
||||
use northstar::{
|
||||
GEMINI_MIME,
|
||||
|
@ -51,7 +52,7 @@ fn handle_request(request: Request) -> BoxFuture<'static, Result<Response>> {
|
|||
if request.path_segments()[0].eq("push") { // User connecting to /push
|
||||
if let Some(push) = request.input() {
|
||||
user.as_mut().push_str(push);
|
||||
user.save();
|
||||
user.save()?;
|
||||
} else {
|
||||
return Ok(Response::input_lossy("Enter a string to push"));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue