From eb917c35008d32b3b27bf132b5f831f05888be54 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 2 May 2020 16:01:19 +0200 Subject: zotcli: Don't dump raw json response after post item. --- examples/zot/item.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/zot/item.rs b/examples/zot/item.rs index 9869492..648a9f0 100644 --- a/examples/zot/item.rs +++ b/examples/zot/item.rs @@ -43,8 +43,12 @@ pub fn post(client: &zotapi::Client, args: &ArgMatches) { } match msg.create(&client) { - Ok(payload) => { - println!("Raw payload: {}", payload); + Ok(res) => { + if res.success { + println!("New item with id {} posted successfully!", res.item_id); + } else { + println!("The item could not be posted."); + } } Err(e) => { println!("Error posting message: {:?}", e); -- cgit v1.2.3