Delete likes

This commit is contained in:
Bat
2018-05-12 21:56:57 +01:00
parent b68e481b3f
commit b8aade1e12
8 changed files with 49 additions and 12 deletions
+1
View File
@@ -32,6 +32,7 @@ fn details(blog: String, slug: String, conn: DbConn, user: Option<User>) -> Temp
})
}).collect::<Vec<serde_json::Value>>(),
"n_likes": post.get_likes(&*conn).len(),
"has_liked": user.clone().map(|u| u.has_liked(&*conn, &post)).unwrap_or(false),
"account": user
}))
}