summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjelemux <jeremias.weber@protonmail.com>2021-02-18 17:33:04 +0100
committerjelemux <jeremias.weber@protonmail.com>2021-02-18 17:33:04 +0100
commit0030ec479a2a3152e22abe104ab0ee25dd36ebd5 (patch)
tree89616a7716e567a994fcee88e0dfef3829b2cc97 /src
parentcfe6df2ab5a30ec85666f1774eca53a5f7ef050b (diff)
downloadwasm-card-0030ec479a2a3152e22abe104ab0ee25dd36ebd5.tar.gz
wasm-card-0030ec479a2a3152e22abe104ab0ee25dd36ebd5.tar.bz2
add uid
Diffstat (limited to 'src')
-rw-r--r--src/view/main.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/view/main.rs b/src/view/main.rs
index df8f326..360a527 100644
--- a/src/view/main.rs
+++ b/src/view/main.rs
@@ -1,3 +1,4 @@
+use uuid::Uuid;
use crate::model::property_groups::address::*;
use crate::model::property_groups::name::*;
use crate::model::property_groups::organizational::*;
@@ -389,11 +390,14 @@ impl Component for MainView {
}
}
- let rev = Local::now();
+ let uid = format!("urn:uuid:{}", Uuid::new_v4());
+
+ let rev = Local::now().to_string();
match builder
.with_version("4.0".to_string())
- .with_rev(format!("{}", rev))
+ .with_rev(rev)
+ .with_uid(uid)
.build()
{
Ok(vcard) => {