From 82b5bb36c5fd6a05b2b2539027b2bac8472fd375 Mon Sep 17 00:00:00 2001 From: red binder Date: Tue, 11 Aug 2026 04:35:12 +0200 Subject: [PATCH] force bearer auth no idea if this is right but i want to protect accounts --- src/nnid/people.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nnid/people.rs b/src/nnid/people.rs index 5f45c08..c81b4b2 100644 --- a/src/nnid/people.rs +++ b/src/nnid/people.rs @@ -647,7 +647,7 @@ impl<'r> FromRequest<'r> for DeviceHeaders { #[get("/v1/api/people/@me/devices")] pub fn get_user_devices( - auth: Auth, + auth: Auth, headers: DeviceHeaders, ) -> Xml { let now = chrono::Utc::now().naive_utc(); @@ -670,21 +670,21 @@ pub fn get_user_devices( } #[get("/v1/api/people/@me/devices/status")] -pub fn get_device_status(_auth: Auth) -> Xml { +pub fn get_device_status(_auth: Auth) -> Xml { Xml(EmptyDeviceResponse { device: String::new(), }) } #[put("/v1/api/people/@me/devices/@current/inactivate")] -pub fn inactivate_current_device(_auth: Auth) -> () { +pub fn inactivate_current_device(_auth: Auth) -> () { // just 200 } #[post("/v1/api/people/@me/deletion")] pub async fn delete_account( database: &State, - auth: Auth, + auth: Auth, ) -> Result<(), Option>> { let db = database.inner(); @@ -706,7 +706,7 @@ pub async fn delete_account( #[put("/v1/api/people/@me", data = "")] pub async fn update_account( database: &State, - auth: Auth, + auth: Auth, data: Xml, ) -> Result<(), Option>> { let db = database.inner(); @@ -764,7 +764,7 @@ pub fn get_own_emails(user: Auth) -> Xml { #[put("/v1/api/people/@me/emails/@primary", data = "")] pub async fn update_primary_email( database: &State, - auth: Auth, + auth: Auth, data: Xml, ) -> Result<(), Option>> { let db = database.inner();