8000 chore: add some more logging to handlers by ellie · Pull Request #1971 · atuinsh/atuin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

chore: add some more logging to handlers #1971

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/atuin-server/src/handlers/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ pub async fn status<DB: Database>(
},
};

tracing::debug!(user = user.username, "requested sync status");

Ok(Json(StatusResponse {
count,
deleted,
Expand Down
3 changes: 3 additions & 0 deletions crates/atuin-server/src/handlers/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,14 @@ pub async fn login<DB: Database>(
let verified = verify_str(user.password.as_str(), login.password.borrow());

if !verified {
debug!(user = user.username, "login failed");
return Err(
ErrorResponse::reply("password is not correct").with_status(StatusCode::UNAUTHORIZED)
);
}

debug!(user = user.username, "login success");

Ok(Json(LoginResponse {
session: session.token,
}))
Expand Down
0