Fix clippy

This commit is contained in:
Jai A
2025-01-16 17:49:26 -08:00
parent 9e97c068d8
commit 8abe2283d7

View File

@@ -880,11 +880,11 @@ pub async fn active_servers(
) -> Result<HttpResponse, ApiError> {
let master_key = dotenvy::var("PYRO_API_KEY")?;
if !req
if req
.head()
.headers()
.get("X-Master-Key")
.is_some_and(|it| it.as_bytes() == master_key.as_bytes())
.is_none_or(|it| it.as_bytes() != master_key.as_bytes())
{
return Err(ApiError::CustomAuthentication(
"Invalid master key".to_string(),