lehen commita

This commit is contained in:
2024-01-05 18:50:06 +01:00
parent 304fb740d8
commit 56f6e46c71
6 changed files with 79 additions and 7 deletions
+2 -2
View File
@@ -101,7 +101,7 @@ pub fn create(
Ok(_) => ValidationErrors::new(),
Err(e) => e,
};
if Blog::find_by_fqn(&conn, slug).is_ok() {
if Blog::find_by_fqn(&conn, &slug).is_ok() {
errors.add(
"title",
ValidationError {
@@ -122,7 +122,7 @@ pub fn create(
let blog = Blog::insert(
&conn,
NewBlog::new_local(
slug.into(),
slug.clone().into(),
form.title.to_string(),
String::from(""),
Instance::get_local()