move name'calculation' into backend
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::{page::new, random_names::get_name_by_uuid, Backend};
|
||||
use crate::{page::new, Backend};
|
||||
use axum::{
|
||||
extract::{Path, State},
|
||||
response::{IntoResponse, Redirect, Response},
|
||||
@@ -41,14 +41,12 @@ async fn index(State(backend): State<Arc<Backend>>, cookies: CookieJar) -> Respo
|
||||
(rank.rank)
|
||||
}
|
||||
@if rank.uuid == client.uuid { (PreEscaped("<mark>")) }
|
||||
@if let Some(name) = rank.name { (name) } @else {
|
||||
"Anonymous "
|
||||
(get_name_by_uuid(&rank.uuid))}
|
||||
(rank.name)
|
||||
@if rank.uuid == client.uuid { (PreEscaped("</mark>")) }
|
||||
}
|
||||
span {
|
||||
(rank.amount)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user