Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Add missing instrumentation and skip messages field
Browse files Browse the repository at this point in the history
  • Loading branch information
0rzech committed Apr 13, 2024
1 parent ca3ad2f commit 4afd138
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/routes/admin/newsletters/get.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use askama_axum::Template;
use axum_messages::Messages;

#[tracing::instrument(name = "Get newsletter form", skip(messages))]
pub(in crate::routes::admin) async fn newsletter_form(
messages: Messages,
) -> NewsletterForm<'static> {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/admin/newsletters/post.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use axum_messages::Messages;
use serde::Deserialize;
use sqlx::PgPool;

#[tracing::instrument(skip(app_state, form))]
#[tracing::instrument(skip(app_state, messages, form))]
pub(in crate::routes::admin) async fn publish_newsletter(
State(app_state): State<AppState>,
messages: Messages,
Expand Down
1 change: 1 addition & 0 deletions src/routes/admin/password/get.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use askama_axum::Template;
use axum_messages::Messages;

#[tracing::instrument(name = "Get change password form", skip(messages))]
pub(in crate::routes::admin) async fn change_password_form(
messages: Messages,
) -> ChangePasswordForm<'static> {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/admin/password/post.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use axum_messages::Messages;
use secrecy::{ExposeSecret, Secret};
use serde::Deserialize;

#[tracing::instrument(skip(app_state, user_id, form))]
#[tracing::instrument(skip(app_state, user_id, messages, form))]
pub(in crate::routes::admin) async fn change_password(
State(app_state): State<AppState>,
SessionUserId(user_id): SessionUserId,
Expand Down
2 changes: 1 addition & 1 deletion src/routes/login/get.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use askama_axum::Template;
use axum_messages::Messages;

#[tracing::instrument(skip(messages))]
#[tracing::instrument(name = "Get login form", skip(messages))]
pub(super) async fn login_form(messages: Messages) -> LoginForm<'static> {
let flashes = messages.map(|m| m.message).collect();

Expand Down

0 comments on commit 4afd138

Please sign in to comment.