From a76200bb7adb6189d84e0e98d6233a470ebeee98 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Wed, 21 Aug 2024 17:34:58 +0200 Subject: Authentication for endpoints --- src/errors.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/errors.rs') diff --git a/src/errors.rs b/src/errors.rs index fafe0b0..1b9a802 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -42,10 +42,7 @@ impl IntoResponse for AppError { "Token creation error".to_string(), ), AppError::InvalidToken => (StatusCode::BAD_REQUEST, "Invalid token".to_string()), - AppError::Unauthorized => ( - StatusCode::UNAUTHORIZED, - "Can't perform this action".to_string(), - ), + AppError::Unauthorized => (StatusCode::UNAUTHORIZED, "Unauthorized".to_string()), }; let body = Json(json!({ -- cgit v1.2.3-18-g5258