UID not UUID

This commit is contained in:
Gregor Reitzenstein 2020-12-16 11:59:40 +01:00
parent 182c8a9736
commit 6913602595
2 changed files with 5 additions and 5 deletions

View File

@ -96,14 +96,14 @@ impl<'a, S: Unpin> Sute<'a, S> {
} }
} }
Some(("minfo", m)) => { Some(("minfo", m)) => {
if let Some(uuid) = m.value_of("uuid") { if let Some(uid) = m.value_of("uid") {
let uuid = uuid.to_string(); let uid = uid.to_string();
if let Some(mut api) = self.session.as_ref().map(|s| s.bootstrap.clone()) { if let Some(mut api) = self.session.as_ref().map(|s| s.bootstrap.clone()) {
let log = self.log.clone(); let log = self.log.clone();
let machines = api.machines(); let machines = api.machines();
let machine = machines.then(|mut machines| { let machine = machines.then(|mut machines| {
machines.get_machine(uuid) machines.get_machine(uid)
}); });
let f = machine.then(move |res| { let f = machine.then(move |res| {
res.as_ref().unwrap().get_info().map(move |info| { res.as_ref().unwrap().get_info().map(move |info| {
@ -116,7 +116,7 @@ impl<'a, S: Unpin> Sute<'a, S> {
} }
} }
} else { } else {
error!(self.log, "minfo <uuid>") error!(self.log, "minfo <uid>")
} }
} }
Some((s, m)) => info!(self.log, "Got Command {} with params {:?}", s, m), Some((s, m)) => info!(self.log, "Got Command {} with params {:?}", s, m),

View File

@ -30,7 +30,7 @@ impl<'help> CommandParser<'help> {
.arg(Arg::new("pass") .arg(Arg::new("pass")
.takes_value(true))) .takes_value(true)))
.subcommand(App::new("minfo") .subcommand(App::new("minfo")
.arg(Arg::new("uuid") .arg(Arg::new("uid")
.takes_value(true))) .takes_value(true)))
, ,
} }