From bee7318ca808d36b29cbf6021ec47252ab2305f8 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 1 Jan 2020 23:45:30 +0100 Subject: zotcli: Limit post to one or more groups. --- examples/zot/item.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'examples/zot') diff --git a/examples/zot/item.rs b/examples/zot/item.rs index eb9013f..e848af2 100644 --- a/examples/zot/item.rs +++ b/examples/zot/item.rs @@ -30,6 +30,12 @@ pub fn post(client: &zotapi::Client, args: &ArgMatches) { msg.file(file); } + if let Some(groups) = dbg!(args.value_of("GROUP")) { + for g in groups.split(",") { + msg.group_allow(g); + } + } + match msg.create() { Ok(payload) => { println!("Raw payload: {}", payload); -- cgit v1.2.3