/*
* Copyright (C) 2025 Jonni Liljamo <jonni@liljamo.com>
*
* This file is licensed under AGPL-3.0-or-later, see NOTICE and LICENSE for
* more information.
*/
pub mod alertmanager;
pub mod message;
macro_rules! extract_token {
($headers:expr) => {
match $headers.get("Authorization") {
Some(token) => match token.to_str() {
Ok(token) => token,
Err(_) => {
return (StatusCode::UNAUTHORIZED, "unauthorized");
}
},
None => {
return (StatusCode::UNAUTHORIZED, "unauthorized");
}
}
};
}
use extract_token;