judu/ex-egopublic Fork
⑂ bd5a162
Commits
⬇ Clone ▾
git clone https://git.rickub.com/judu/ex-ego.git
git clone ssh://git@rickub.com/judu/ex-ego.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

chore: nettoyage de code mort (users::username remplacé par profile, clé i18n title_timer inutilisée)Unverified

Claude-Session: https://claude.ai/code/session_01FPKHKGfqvnvXKY9tNhYmkh
Julien Durillon committed 2026-08-09T00:51:29+02:00 Browse files
bd5a162 parent: 85f0632
modified src/db/users.rs +0 -8
@@ -37,14 +37,6 @@ pub async fn update_password(pool: &PgPool, id: Uuid, password_hash: &str) -> sq
3737 Ok(())
3838 }
3939
40-pub async fn username(pool: &PgPool, id: Uuid) -> sqlx::Result<Option<String>> {
41- let row: Option<(String,)> = sqlx::query_as("SELECT username FROM users WHERE id = $1")
42- .bind(id)
43- .fetch_optional(pool)
44- .await?;
45- Ok(row.map(|(u,)| u))
46-}
47-
4840 /// (username, code langue) — profil minimal chargé à chaque requête.
4941 pub async fn profile(pool: &PgPool, id: Uuid) -> sqlx::Result<Option<(String, String)>> {
5042 sqlx::query_as("SELECT username, lang FROM users WHERE id = $1")
@@ -37,14 +37,6 @@ pub async fn update_password(pool: &PgPool, id: Uuid, password_hash: &str) -> sq
37 Ok(())37 Ok(())
38 }38 }
39 39
40-pub async fn username(pool: &PgPool, id: Uuid) -> sqlx::Result<Option<String>> {
41- let row: Option<(String,)> = sqlx::query_as("SELECT username FROM users WHERE id = $1")
42- .bind(id)
43- .fetch_optional(pool)
44- .await?;
45- Ok(row.map(|(u,)| u))
46-}
47-
48 /// (username, code langue) — profil minimal chargé à chaque requête.40 /// (username, code langue) — profil minimal chargé à chaque requête.
49 pub async fn profile(pool: &PgPool, id: Uuid) -> sqlx::Result<Option<(String, String)>> {41 pub async fn profile(pool: &PgPool, id: Uuid) -> sqlx::Result<Option<(String, String)>> {
50 sqlx::query_as("SELECT username, lang FROM users WHERE id = $1")42 sqlx::query_as("SELECT username, lang FROM users WHERE id = $1")
modified src/i18n.rs +0 -4
@@ -109,7 +109,6 @@ pub struct Tr {
109109 pub err_duration_min: &'static str,
110110 pub err_cat_team: &'static str,
111111 // ─── minuteur ───
112- pub title_timer: &'static str,
113112 pub chrono_kicker: &'static str,
114113 pub started_at_pat: &'static str,
115114 pub chrono_hint: &'static str,
@@ -353,7 +352,6 @@ pub static FR: Tr = Tr {
353352 added_pat: "{} ajouté ✓",
354353 err_duration_min: "La durée doit être d'au moins 1 minute.",
355354 err_cat_team: "Cette catégorie n'appartient pas à l'équipe active.",
356- title_timer: "Minuteur",
357355 chrono_kicker: "Minuteur en cours",
358356 started_at_pat: "Démarré à {}",
359357 chrono_hint: "Termine le minuteur pour choisir la catégorie et enregistrer ce temps.",
@@ -561,7 +559,6 @@ pub static EN: Tr = Tr {
561559 added_pat: "{} added ✓",
562560 err_duration_min: "The duration must be at least 1 minute.",
563561 err_cat_team: "This category does not belong to the active team.",
564- title_timer: "Timer",
565562 chrono_kicker: "Timer running",
566563 started_at_pat: "Started at {}",
567564 chrono_hint: "Finish the timer to pick a category and record this time.",
@@ -769,7 +766,6 @@ pub static DE: Tr = Tr {
769766 added_pat: "{} erfasst ✓",
770767 err_duration_min: "Die Dauer muss mindestens 1 Minute betragen.",
771768 err_cat_team: "Diese Kategorie gehört nicht zum aktiven Team.",
772- title_timer: "Timer",
773769 chrono_kicker: "Timer läuft",
774770 started_at_pat: "Gestartet um {}",
775771 chrono_hint: "Beende den Timer, um eine Kategorie zu wählen und die Zeit zu erfassen.",
@@ -109,7 +109,6 @@ pub struct Tr {
109 pub err_duration_min: &'static str,109 pub err_duration_min: &'static str,
110 pub err_cat_team: &'static str,110 pub err_cat_team: &'static str,
111 // ─── minuteur ───111 // ─── minuteur ───
112- pub title_timer: &'static str,
113 pub chrono_kicker: &'static str,112 pub chrono_kicker: &'static str,
114 pub started_at_pat: &'static str,113 pub started_at_pat: &'static str,
115 pub chrono_hint: &'static str,114 pub chrono_hint: &'static str,
@@ -353,7 +352,6 @@ pub static FR: Tr = Tr {
353 added_pat: "{} ajouté ✓",352 added_pat: "{} ajouté ✓",
354 err_duration_min: "La durée doit être d'au moins 1 minute.",353 err_duration_min: "La durée doit être d'au moins 1 minute.",
355 err_cat_team: "Cette catégorie n'appartient pas à l'équipe active.",354 err_cat_team: "Cette catégorie n'appartient pas à l'équipe active.",
356- title_timer: "Minuteur",
357 chrono_kicker: "Minuteur en cours",355 chrono_kicker: "Minuteur en cours",
358 started_at_pat: "Démarré à {}",356 started_at_pat: "Démarré à {}",
359 chrono_hint: "Termine le minuteur pour choisir la catégorie et enregistrer ce temps.",357 chrono_hint: "Termine le minuteur pour choisir la catégorie et enregistrer ce temps.",
@@ -561,7 +559,6 @@ pub static EN: Tr = Tr {
561 added_pat: "{} added ✓",559 added_pat: "{} added ✓",
562 err_duration_min: "The duration must be at least 1 minute.",560 err_duration_min: "The duration must be at least 1 minute.",
563 err_cat_team: "This category does not belong to the active team.",561 err_cat_team: "This category does not belong to the active team.",
564- title_timer: "Timer",
565 chrono_kicker: "Timer running",562 chrono_kicker: "Timer running",
566 started_at_pat: "Started at {}",563 started_at_pat: "Started at {}",
567 chrono_hint: "Finish the timer to pick a category and record this time.",564 chrono_hint: "Finish the timer to pick a category and record this time.",
@@ -769,7 +766,6 @@ pub static DE: Tr = Tr {
769 added_pat: "{} erfasst ✓",766 added_pat: "{} erfasst ✓",
770 err_duration_min: "Die Dauer muss mindestens 1 Minute betragen.",767 err_duration_min: "Die Dauer muss mindestens 1 Minute betragen.",
771 err_cat_team: "Diese Kategorie gehört nicht zum aktiven Team.",768 err_cat_team: "Diese Kategorie gehört nicht zum aktiven Team.",
772- title_timer: "Timer",
773 chrono_kicker: "Timer läuft",769 chrono_kicker: "Timer läuft",
774 started_at_pat: "Gestartet um {}",770 started_at_pat: "Gestartet um {}",
775 chrono_hint: "Beende den Timer, um eine Kategorie zu wählen und die Zeit zu erfassen.",771 chrono_hint: "Beende den Timer, um eine Kategorie zu wählen und die Zeit zu erfassen.",