Display notifications

This commit is contained in:
Bat
2018-05-13 14:35:55 +01:00
parent 726c2c7e82
commit b91f567777
5 changed files with 43 additions and 1 deletions
+1
View File
@@ -5,6 +5,7 @@ pub mod blogs;
pub mod comments;
pub mod instance;
pub mod likes;
pub mod notifications;
pub mod posts;
pub mod session;
pub mod user;
+13
View File
@@ -0,0 +1,13 @@
use rocket_contrib::Template;
use db_conn::DbConn;
use models::notifications::Notification;
use models::users::User;
#[get("/notifications")]
fn notifications(conn: DbConn, user: User) -> Template {
Template::render("notifications/index", json!({
"account": user,
"notifications": Notification::find_for_user(&*conn, &user)
}))
}