updated theming and fixed warnings

This commit is contained in:
2026-03-26 10:35:28 +01:00
parent 85549d41f8
commit 63cc84916e
11 changed files with 119 additions and 115 deletions
+14 -5
View File
@@ -4,9 +4,9 @@ pub mod handlers;
pub mod models;
use axum::{
extract::DefaultBodyLimit,
routing::{delete, get, post},
Router,
extract::DefaultBodyLimit,
routing::{get, post},
};
use std::{env, fs, path::PathBuf, sync::Arc};
use tower_http::{
@@ -54,9 +54,18 @@ async fn main() {
.allow_headers(Any);
let app = Router::new()
.route("/api/config", get(handlers::config::get_config).post(handlers::config::update_config))
.route("/api/posts", get(handlers::posts::list_posts).post(handlers::posts::create_post))
.route("/api/posts/{slug}", get(handlers::posts::get_post).delete(handlers::posts::delete_post))
.route(
"/api/config",
get(handlers::config::get_config).post(handlers::config::update_config),
)
.route(
"/api/posts",
get(handlers::posts::list_posts).post(handlers::posts::create_post),
)
.route(
"/api/posts/{slug}",
get(handlers::posts::get_post).delete(handlers::posts::delete_post),
)
.route("/api/uploads", get(handlers::upload::list_uploads))
.route("/api/upload", post(handlers::upload::upload_file))
.nest_service("/uploads", ServeDir::new(uploads_dir))