mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-05-24 21:25:20 +00:00
chore: Cleanup
This commit is contained in:
+2
-3
@@ -34,12 +34,11 @@ struct Error {
|
||||
}
|
||||
|
||||
let status = match &self {
|
||||
| Self::ValidationError(_) => StatusCode::BAD_REQUEST,
|
||||
| Self::BadRequest(_) => StatusCode::BAD_REQUEST,
|
||||
| Self::ValidationError(_) | Self::BadRequest(_) => StatusCode::BAD_REQUEST,
|
||||
| _ => StatusCode::INTERNAL_SERVER_ERROR,
|
||||
};
|
||||
|
||||
let template = Error { error: self, status: status.clone() };
|
||||
let template = Error { error: self, status };
|
||||
|
||||
if let Ok(body) = template.render() {
|
||||
(status, Html(body)).into_response()
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
use askama::{Template, filters::HtmlSafe};
|
||||
use base64::Engine;
|
||||
use conduwuit_core::{Result, result::FlatOk, utils::TryFutureExtExt};
|
||||
use conduwuit_core::result::FlatOk;
|
||||
use conduwuit_service::Services;
|
||||
use futures::TryFutureExt;
|
||||
use ruma::UserId;
|
||||
|
||||
pub(super) mod form;
|
||||
@@ -32,7 +31,7 @@ pub(super) struct UserCard<'a> {
|
||||
impl HtmlSafe for UserCard<'_> {}
|
||||
|
||||
impl<'a> UserCard<'a> {
|
||||
pub async fn for_local_user(services: &Services, user_id: &'a UserId) -> Self {
|
||||
pub(super) async fn for_local_user(services: &Services, user_id: &'a UserId) -> Self {
|
||||
let display_name = services.users.displayname(user_id).await.ok();
|
||||
|
||||
let avatar_src = async {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -19,6 +19,7 @@
|
||||
<input
|
||||
type="{{ input.input_type }}"
|
||||
id="{{ input.id }}"
|
||||
autocomplete="{{ input.autocomplete }}
|
||||
{% if input.type_name.is_some() %}name="{{ input.id }}"{% endif %}
|
||||
{% if input.required %}required{% endif %}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user