Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Commit b498e59

Browse files
committed
Move the /link/:device endpoint to /device/:device
It prevents browsers to try to autocomplete /link to /link/:device
1 parent b0042eb commit b498e59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/router/src/endpoints.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ impl Route for DeviceCodeLink {
738738
}
739739
}
740740

741-
/// `GET|POST /link/:device_code_id`
741+
/// `GET|POST /device/:device_code_id`
742742
#[derive(Default, Serialize, Deserialize, Debug, Clone)]
743743
pub struct DeviceCodeConsent {
744744
id: Ulid,
@@ -747,11 +747,11 @@ pub struct DeviceCodeConsent {
747747
impl Route for DeviceCodeConsent {
748748
type Query = ();
749749
fn route() -> &'static str {
750-
"/link/:device_code_id"
750+
"/device/:device_code_id"
751751
}
752752

753753
fn path(&self) -> std::borrow::Cow<'static, str> {
754-
format!("/link/{}", self.id).into()
754+
format!("/device/{}", self.id).into()
755755
}
756756
}
757757

0 commit comments

Comments
 (0)