chore: remove em-dashes from comments

This commit is contained in:
SAY-5
2026-05-11 13:05:03 -07:00
committed by Sai Asish Y
parent 9dfb29bdda
commit b9af3092be
4 changed files with 28 additions and 28 deletions
+10 -10
View File
@@ -22,7 +22,7 @@ use crate::interfaces::middleware::auth::CurrentUserId;
use crate::interfaces::middleware::trusted_proxy::client_ip_from_parts;
use serde::Deserialize;
/// Public auth routes — no authentication required.
/// Public auth routes, no authentication required.
pub fn auth_public_routes() -> Router<Arc<AppState>> {
Router::new()
.route("/status", get(get_system_status))
@@ -36,7 +36,7 @@ pub fn auth_public_routes() -> Router<Arc<AppState>> {
.route("/magic-link/send", post(send_magic_link))
}
/// Protected auth routes — require authentication (auth + CSRF middleware
/// Protected auth routes, require authentication (auth + CSRF middleware
/// must be applied by the caller in main.rs).
pub fn auth_protected_routes() -> Router<Arc<AppState>> {
use axum::routing::patch;
@@ -48,7 +48,7 @@ pub fn auth_protected_routes() -> Router<Arc<AppState>> {
.route("/logout", post(logout))
}
/// Rate-limited auth routes — split out so main.rs can apply per-endpoint
/// Rate-limited auth routes, split out so main.rs can apply per-endpoint
/// rate limiting middleware independently.
pub fn login_route() -> Router<Arc<AppState>> {
Router::new().route("/login", post(login))
@@ -62,7 +62,7 @@ pub fn refresh_route() -> Router<Arc<AppState>> {
Router::new().route("/refresh", post(refresh_token))
}
/// Public setup route — only active before the first admin is created.
/// Public setup route, only active before the first admin is created.
pub fn setup_route() -> Router<Arc<AppState>> {
Router::new().route("/setup", post(setup_admin))
}
@@ -330,7 +330,7 @@ pub async fn login(
.await
{
Ok(auth_response) => {
// ── Successful login — reset lockout counter ──
// ── Successful login, reset lockout counter ──
auth_service
.login_lockout
.record_success(&dto.username, &client_ip);
@@ -362,7 +362,7 @@ pub async fn login(
cookie_auth::append_csrf_cookie(response.headers_mut(), auth_response.expires_in);
// Diagnostic: warn when Secure cookies are set but the request
// arrived over plain HTTP — the browser will reject them (#241).
// arrived over plain HTTP, the browser will reject them (#241).
if cookie_auth::is_cookie_secure() {
let is_tls = headers
.get("x-forwarded-proto")
@@ -690,7 +690,7 @@ pub async fn setup_admin(
));
}
// 4. ATOMIC: claim initialization — only one concurrent request can win.
// 4. ATOMIC: claim initialization, only one concurrent request can win.
// We use Uuid::nil() as a placeholder because the admin user
// doesn't exist yet. It will be updated to the real id below.
let claimed = admin_svc
@@ -726,7 +726,7 @@ pub async fn setup_admin(
// 5. Update the initialization record with the real admin user_id
let real_user_id = Uuid::parse_str(&user.id).unwrap_or_default();
if let Err(e) = admin_svc.mark_system_initialized(real_user_id).await {
// Not fatal — the claim already prevents concurrent re-initialization,
// Not fatal, the claim already prevents concurrent re-initialization,
// and the "pending" marker is still "true" so the system stays locked.
tracing::error!(
"Created admin but failed to update initialized_by with real user id: {}",
@@ -937,7 +937,7 @@ pub async fn oidc_callback(
match result {
OidcCallbackResult::WebLogin { exchange_code } => {
// Regular web login — redirect to frontend with exchange code
// Regular web login, redirect to frontend with exchange code
let config = auth_app.oidc_config().unwrap();
let frontend_url = config.frontend_url.trim_end_matches('/');
let redirect_url = format!("{}/?oidc_code={}", frontend_url, exchange_code);
@@ -949,7 +949,7 @@ pub async fn oidc_callback(
user_id,
username,
} => {
// Nextcloud Login Flow v2 — create app password and complete flow
// Nextcloud Login Flow v2, create app password and complete flow
let nextcloud = state
.nextcloud
.as_ref()