Reworked Reviews page
Build and Publish / Build and Publish Docker Image (push) Successful in 2m47s

This commit is contained in:
2026-05-25 13:50:24 +03:00
parent e9e16dd807
commit dcc665563a
31 changed files with 2674 additions and 1137 deletions
+5 -7
View File
@@ -1,7 +1,7 @@
use cot::Body;
use cot::db::Database;
use cot::response::IntoResponse;
use cot::session::Session;
use cot::Body;
use crate::user::User;
@@ -78,12 +78,10 @@ pub async fn require_admin_or_redirect(
return Err(redirect("/login"));
};
if user.role != Role::Admin {
return Err(
"Forbidden"
.with_status(cot::http::StatusCode::FORBIDDEN)
.into_response()
.expect("valid response"),
);
return Err("Forbidden"
.with_status(cot::http::StatusCode::FORBIDDEN)
.into_response()
.expect("valid response"));
}
Ok(user)
}