Fix build errors
This commit is contained in:
parent
08cb337df6
commit
642884034d
@ -100,7 +100,7 @@ impl User {
|
|||||||
find_by!(users, find_by_name, username as String, instance_id as i32);
|
find_by!(users, find_by_name, username as String, instance_id as i32);
|
||||||
find_by!(users, find_by_ap_url, ap_url as String);
|
find_by!(users, find_by_ap_url, ap_url as String);
|
||||||
|
|
||||||
pub fn one_by_instance(&self, conn: &PgConnection) -> Vec<User> {
|
pub fn one_by_instance(conn: &PgConnection) -> Vec<User> {
|
||||||
users::table.distinct_on(users::instance_id)
|
users::table.distinct_on(users::instance_id)
|
||||||
.get_results::<User>(conn)
|
.get_results::<User>(conn)
|
||||||
.expect("Error in User::on_by_instance")
|
.expect("Error in User::on_by_instance")
|
||||||
|
@ -33,7 +33,7 @@ fn create(blog_name: String, slug: String, data: LenientForm<NewCommentForm>, us
|
|||||||
let form = data.get();
|
let form = data.get();
|
||||||
form.validate()
|
form.validate()
|
||||||
.map(|_| {
|
.map(|_| {
|
||||||
let (new_comment, id) = NewComment::build()
|
let (new_comment, _) = NewComment::build()
|
||||||
.content(form.content.clone())
|
.content(form.content.clone())
|
||||||
.in_response_to_id(form.responding_to.clone())
|
.in_response_to_id(form.responding_to.clone())
|
||||||
.post(post.clone())
|
.post(post.clone())
|
||||||
@ -47,7 +47,7 @@ fn create(blog_name: String, slug: String, data: LenientForm<NewCommentForm>, us
|
|||||||
let user_clone = user.clone();
|
let user_clone = user.clone();
|
||||||
worker.execute(Thunk::of(move || broadcast(&user_clone, new_comment, dest)));
|
worker.execute(Thunk::of(move || broadcast(&user_clone, new_comment, dest)));
|
||||||
|
|
||||||
Redirect::to(format!(uri!(super::posts::details: blog_name = blog_name, slug = slug))
|
Redirect::to(uri!(super::posts::details: blog = blog_name, slug = slug))
|
||||||
})
|
})
|
||||||
.map_err(|errors| {
|
.map_err(|errors| {
|
||||||
// TODO: de-duplicate this code
|
// TODO: de-duplicate this code
|
||||||
|
Loading…
Reference in New Issue
Block a user