Update password endpoint #8

Merged
phoenix merged 9 commits from update_password into main 2026-06-12 13:08:35 -04:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit dac9e3f2f8 - Show all commits
+4 -4
View File
@@ -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,
+2 -2
View File
@@ -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)
}