mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 09:10:08 +00:00
require name for new identity
This commit is contained in:
parent
17f356dde7
commit
eb21c4d844
@ -115,7 +115,7 @@ impl Gemini {
|
||||
profile
|
||||
.identity
|
||||
.gemini
|
||||
.create(None, widget.form.name.value().as_deref())
|
||||
.create(None, &widget.form.name.value().unwrap())
|
||||
.unwrap(), // @TODO handle result,
|
||||
),
|
||||
};
|
||||
|
@ -56,11 +56,7 @@ impl Gemini {
|
||||
|
||||
/// Create new record
|
||||
/// * return new `profile_identity_gemini_id` on success
|
||||
pub fn create(
|
||||
&self,
|
||||
time: Option<(DateTime, DateTime)>,
|
||||
name: Option<&str>,
|
||||
) -> Result<i64, Error> {
|
||||
pub fn create(&self, time: Option<(DateTime, DateTime)>, name: &str) -> Result<i64, Error> {
|
||||
// Generate new certificate
|
||||
match certificate::generate(
|
||||
match time {
|
||||
@ -70,10 +66,7 @@ impl Gemini {
|
||||
DateTime::from_local(9999, 12, 31, 23, 59, 59.9).unwrap(), // max @TODO
|
||||
),
|
||||
},
|
||||
match name {
|
||||
Some(value) => value, // @TODO make sure it's unique
|
||||
None => "unknown", // @TODO randomize
|
||||
},
|
||||
name,
|
||||
) {
|
||||
Ok(pem) => match self.database.add(&pem) {
|
||||
Ok(profile_identity_gemini_id) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user