feat: only show the published archives
This commit is contained in:
parent
fc0f709b51
commit
6f38a8f956
@ -34,7 +34,7 @@ use rocket::response::Redirect;
|
|||||||
fn index(conn: DbConn) -> Template {
|
fn index(conn: DbConn) -> Template {
|
||||||
let mut context = Context::new();
|
let mut context = Context::new();
|
||||||
|
|
||||||
let result = posts.load::<Post>(&*conn).expect("cannot load posts");
|
let result = posts.filter(published.eq(true)).load::<Post>(&*conn).expect("cannot load posts");
|
||||||
context.add("posts", &result);
|
context.add("posts", &result);
|
||||||
|
|
||||||
println!("{:?}", result);
|
println!("{:?}", result);
|
||||||
|
Loading…
Reference in New Issue
Block a user