diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 84fe239..4aa448d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,12 +24,12 @@ implement_responder_for!(IndexTemplate<'a>); #[get("/", format = "text/html")] fn index<'a>(conn: rocket_blog::DbConn) -> IndexTemplate<'a> { - IndexTemplate { title: "Bloggen", posts: models::get_posts(conn) } + IndexTemplate { title: "Bloggen", posts: models::Post::get_all(conn) } } #[get("/", format = "application/json")] fn index_json(conn: rocket_blog::DbConn) -> Json<Vec<models::Post>> { - Json(models::get_posts(conn)) + Json(models::Post::get_all(conn)) } fn main() { |