Skip to content

Conversation

@Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Jan 13, 2025

As discussed in our last team meeting, this pull requests adds a required "Reason" input field to the crate deletion page:

Bildschirmfoto 2025-01-13 um 16 22 50

@Turbo87 Turbo87 added C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works A-frontend 🐹 labels Jan 13, 2025
@Turbo87 Turbo87 force-pushed the delete-reason-input branch from b66a163 to 8719a86 Compare January 13, 2025 15:33
@Turbo87 Turbo87 requested a review from a team January 13, 2025 15:41
@Turbo87 Turbo87 merged commit c02bc06 into rust-lang:main Jan 14, 2025
9 checks passed
@Turbo87 Turbo87 deleted the delete-reason-input branch January 14, 2025 10:11
@eth3lbert
Copy link
Contributor

🙋 Should we add a test case for sending with no reason input?

@Turbo87
Copy link
Member Author

Turbo87 commented Jan 14, 2025

I won't say no if someone added one :D


let reason = snapshot.adapterOptions.reason;
if (reason) {
url += `?reason=${encodeURIComponent(reason)}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Turbo87 🙋 If I understand correctly, the query string is named message at the backend

#[derive(Debug, Deserialize, FromRequestParts, utoipa::IntoParams)]
#[from_request(via(Query), rejection(QueryRejection))]
#[into_params(parameter_in = Query)]
pub struct DeleteQueryParams {
message: Option<String>,
}
, but here we are sending it as reason. I think this might be a mistake?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

damn, you're right... 🤦‍♂️

Turbo87 added a commit to Turbo87/crates.io that referenced this pull request Jan 14, 2025
Turbo87 added a commit that referenced this pull request Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-frontend 🐹 C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants