-
Notifications
You must be signed in to change notification settings - Fork 611
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
crate/delete: Add required reason input field #10380
Conversation
b66a163
to
8719a86
Compare
🙋 Should we add a test case for sending with no reason input? |
I won't say no if someone added one :D |
|
||
let reason = snapshot.adapterOptions.reason; | ||
if (reason) { | ||
url += `?reason=${encodeURIComponent(reason)}`; |
There was a problem hiding this comment.
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
crates.io/src/controllers/krate/delete.rs
Lines 24 to 29 in 19c80e0
#[derive(Debug, Deserialize, FromRequestParts, utoipa::IntoParams)] | |
#[from_request(via(Query), rejection(QueryRejection))] | |
#[into_params(parameter_in = Query)] | |
pub struct DeleteQueryParams { | |
message: Option<String>, | |
} |
reason
. I think this might be a mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
damn, you're right... 🤦♂️
As discussed in our last team meeting, this pull requests adds a required "Reason" input field to the crate deletion page: