aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-server/src/handlers/user.rs
diff options
context:
space:
mode:
Diffstat (limited to 'atuin-server/src/handlers/user.rs')
-rw-r--r--atuin-server/src/handlers/user.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/atuin-server/src/handlers/user.rs b/atuin-server/src/handlers/user.rs
index 42e4aa33..a9a48fdc 100644
--- a/atuin-server/src/handlers/user.rs
+++ b/atuin-server/src/handlers/user.rs
@@ -6,6 +6,7 @@ use axum::extract::Path;
use axum::{Extension, Json};
use http::StatusCode;
use sodiumoxide::crypto::pwhash::argon2id13;
+use tracing::{debug, error, instrument};
use uuid::Uuid;
use crate::database::{Database, Postgres};
@@ -26,6 +27,7 @@ pub fn verify_str(secret: &str, verify: &str) -> bool {
}
}
+#[instrument(skip_all, fields(user.username = username.as_str()))]
pub async fn get(
Path(username): Path<String>,
db: Extension<Postgres>,
@@ -48,6 +50,7 @@ pub async fn get(
}))
}
+#[instrument(skip_all)]
pub async fn register(
Json(register): Json<RegisterRequest>,
settings: Extension<Settings>,
@@ -95,6 +98,7 @@ pub async fn register(
}
}
+#[instrument(skip_all, fields(user.username = login.username.as_str()))]
pub async fn login(
login: Json<LoginRequest>,
db: Extension<Postgres>,