summaryrefslogtreecommitdiff
path: root/src/errors.rs
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2024-08-21 17:34:58 +0200
committerSanto Cariotti <santo@dcariotti.me>2024-08-21 17:34:58 +0200
commita76200bb7adb6189d84e0e98d6233a470ebeee98 (patch)
treef0c1dd5aba99ff33d01a5780f695cf65a9dcc411 /src/errors.rs
parenta92fb07d23fb2268a6f4e650c5cbd00ad993e760 (diff)
Authentication for endpoints
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs5
1 files changed, 1 insertions, 4 deletions
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!({