summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 710fbda..36463a6 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -104,10 +104,11 @@ fn unit_status(r: &mut Request) -> IronResult<Response> {
format!("Unit ({}) does not match {}",
unit_name, re))));
}
- let unit = unit::get_units(unit_name);
+ let ref unit = itry!(unit::get_units(unit_name))[0];
let log = itry!(journal::get_log(unit_name, 15));
Ok(Response::with((status::Ok,
- format!("{:?}\n{}", unit, log))))
+ Header(ContentType::html()),
+ render::unit_status(&unit, &log))))
}
fn main() {