feat: tracing system

fix: 🚑 user_contact is not containing value
feat:  html mail system
refactor: ♻️ axum 0.8 routing compatibility
fix: 🚑 custom claim isn't working in jwt
feat:  token header extended compatibility
This commit is contained in:
Ahmet Kaan GÜMÜŞ 2025-01-23 21:34:54 +03:00
parent 3f2aa572a6
commit 0bb5a0b753
25 changed files with 182 additions and 99 deletions

View file

@ -57,6 +57,11 @@ impl Default for ServerConfig {
fn default() -> Self {
let (header, mut server_configs) = naive_toml_parser(SERVER_CONFIG_FILE_LOCATION);
let value_or_max = |value: String| value.parse().map_or(usize::MAX, |value| value);
let value_or_semaphore_max = |value: String| {
value
.parse()
.map_or(tokio::sync::Semaphore::MAX_PERMITS, |value| value)
};
if header == "[server_config]" {
Self {
@ -66,7 +71,7 @@ impl Default for ServerConfig {
server_configs.pop_front().unwrap(),
),
login_token_refresh_time_limit: value_or_max(server_configs.pop_front().unwrap()),
concurrency_limit: value_or_max(server_configs.pop_front().unwrap()),
concurrency_limit: value_or_semaphore_max(server_configs.pop_front().unwrap()),
}
} else {
panic!("Server Config File Must Include [server_config] at the First Line")