accounters/webserver/src/routes/static_routes.rs

23 lines
436 B
Rust
Raw Normal View History

2024-02-19 23:51:18 +01:00
use std::fs;
use axum::response::IntoResponse;
use hyper::{header::CONTENT_TYPE, StatusCode};
use crate::static_values;
2024-02-19 23:51:18 +01:00
pub async fn styles() -> impl IntoResponse {
(
StatusCode::OK,
[(CONTENT_TYPE, "text/css")],
static_values::STYLES,
2024-02-19 23:51:18 +01:00
)
}
pub async fn csv() -> impl IntoResponse {
(
StatusCode::OK,
[(CONTENT_TYPE, "application/javascript")],
static_values::CSV,
)
}