Fix: Allow to pass only UUIDs and automatically add "todo/" prefix

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2019-11-23 20:00:01 +01:00
parent 82146e0c98
commit 8e0be9f1f7

View file

@ -208,6 +208,11 @@ impl IdPathProvider for PathProvider {
} }
.map(|v| v .map(|v| v
.into_iter() .into_iter()
.map(|s| if s.starts_with("todo") {
s.to_string()
} else {
format!("todo/{}", s)
})
.map(PathBuf::from) .map(PathBuf::from)
.map(|pb| pb.into_storeid()) .map(|pb| pb.into_storeid())
.collect::<Result<Vec<_>>>() .collect::<Result<Vec<_>>>()