1
0
Fork 0

Remove unnecessary code

This commit is contained in:
Alex Kotov 2020-10-24 22:21:40 +05:00
parent a4c7d610a3
commit 98dc60cc79
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
2 changed files with 2 additions and 17 deletions

View File

@ -10,20 +10,13 @@ use rocket_csrf::CsrfToken;
#[get("/")]
pub fn index(
i18n: State<I18n>,
_i18n: State<I18n>,
csrf_token: CsrfToken,
current_user: states::MaybeCurrentUser,
) -> Result<Template, CommonResponse> {
let l10n = i18n.l10n("en")?;
let page_context = views::home::Index {
i18n_fedihub: l10n.translate("fedihub")?,
i18n_federated_services_without_censorship: l10n.translate("federated-services-without-censorship")?,
};
let context = views::Site {
page: "home/index".to_string(),
page_context,
page_context: (),
authenticity_token: csrf_token.authenticity_token().to_string(),
current_user: current_user.0,
};

View File

@ -24,14 +24,6 @@ pub mod donate {
}
}
pub mod home {
#[derive(Serialize)]
pub struct Index {
pub i18n_fedihub: String,
pub i18n_federated_services_without_censorship: String,
}
}
pub mod reports {
use crate::models;