From dac9e3f2f8751f289b78d75605c508c8dd8b912a Mon Sep 17 00:00:00 2001 From: phoenix Date: Fri, 12 Jun 2026 12:33:53 -0400 Subject: [PATCH] Got it working --- src/callers/login.rs | 8 ++++---- src/lib.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/callers/login.rs b/src/callers/login.rs index 1104cad..60ad921 100644 --- a/src/callers/login.rs +++ b/src/callers/login.rs @@ -49,9 +49,9 @@ pub mod request { impl UpdatePasswordRequest { pub fn is_valid(&self) -> bool { if self.user_id.is_nil() - || !self.current_password.is_empty() - || !self.updated_password.is_empty() - || !self.confirmed_password.is_empty() + || self.current_password.is_empty() + || self.updated_password.is_empty() + || self.confirmed_password.is_empty() { false } else { @@ -540,7 +540,7 @@ pub async fn refresh_token( /// Endpoint for a updating password #[utoipa::path( - post, + patch, path = super::endpoints::UPDATE_PASSWORD, request_body( content = request::UpdatePasswordRequest, diff --git a/src/lib.rs b/src/lib.rs index 34841f0..fbfa407 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,7 +8,7 @@ pub mod token_stuff; pub mod init { use axum::{ Router, - routing::{get, post}, + routing::{get, patch, post}, }; use utoipa::OpenApi; @@ -112,7 +112,7 @@ pub mod init { ) .route( callers::endpoints::UPDATE_PASSWORD, - post(callers::login::update_password), + patch(callers::login::update_password), ) .layer(cors::configure_cors().await) }