feat: migrate pages mod to use actix_auth_middleware

This commit is contained in:
realaravinth
2022-05-07 12:29:02 +05:30
parent abe494b6e5
commit b057e48d72
12 changed files with 60 additions and 13 deletions

View File

@@ -66,7 +66,10 @@ impl Notification {
const PAGE: &str = "Notifications";
#[my_codegen::get(path = "crate::PAGES.panel.notifications", wrap = "crate::CheckLogin")]
#[my_codegen::get(
path = "crate::PAGES.panel.notifications",
wrap = "crate::pages::get_middleware()"
)]
pub async fn notifications(data: AppData, id: Identity) -> PageResult<impl Responder> {
let receiver = id.identity().unwrap();
// TODO handle error where payload.to doesnt exist