findpenguins-feed/src/css_handler.rs

13 lines
408 B
Rust

use axum::http::StatusCode;
use axum::{http::Response, response::IntoResponse};
static STYLESHEET: &str = include_str!("../static/styles.css");
pub async fn stylesheet_handler() -> Result<impl IntoResponse, StatusCode> {
let response = Response::builder()
.header("Content-Type", "text/css")
.body(STYLESHEET.to_string());
response.map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)
}