Remove unnecessary code
This commit is contained in:
parent
a4c7d610a3
commit
98dc60cc79
2 changed files with 2 additions and 17 deletions
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Reference in a new issue