diff --git a/src/routes/blogs.rs b/src/routes/blogs.rs index 53a3cc18..632138da 100644 --- a/src/routes/blogs.rs +++ b/src/routes/blogs.rs @@ -158,7 +158,7 @@ pub fn create(form: LenientForm, rockets: PlumeRocket) -> RespondOr let custom_domain = if *(&form.custom_domain.is_empty()) { None } else { - Some(Host::new(*(&form.custom_domain))) + Some(Host::new(form.custom_domain.clone())) }; let mut errors = match form.validate() { diff --git a/templates/blogs/new.rs.html b/templates/blogs/new.rs.html index 6a22f734..118d78a7 100644 --- a/templates/blogs/new.rs.html +++ b/templates/blogs/new.rs.html @@ -9,10 +9,10 @@ @:base(ctx, i18n!(ctx.1, "New Blog"), {}, {}, {

@i18n!(ctx.1, "Create a blog")

- @input!(ctx.1, title (text), "Title", form, errors, "required minlength=\"1\"") + @input!(ctx.1, title (text), "Title", form, errors.clone(), "required minlength=\"1\"") - @input!(ctx.1, custom_domain (optional text), "Custom Domain", form, errors.clone(), "") + @input!(ctx.1, custom_domain (optional text), "Custom Domain", form, errors, "")
})