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

@@ -38,7 +38,10 @@ impl IndexPage {
}
/// render a list of all sitekeys that a user has
#[my_codegen::get(path = "crate::PAGES.panel.sitekey.list", wrap = "crate::CheckLogin")]
#[my_codegen::get(
path = "crate::PAGES.panel.sitekey.list",
wrap = "crate::pages::get_middleware()"
)]
pub async fn list_sitekeys(data: AppData, id: Identity) -> PageResult<impl Responder> {
let res = get_list_sitekeys(&data, &id).await?;
let body = IndexPage::new(res).render_once().unwrap();