Files
keep/src/modes/server/api/mod.rs
Andrew Phillips efb354ba38 refactor: remove redundant status module export from api mod
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
2025-08-12 15:49:11 -03:00

24 lines
869 B
Rust

pub mod item;
use axum::{
routing::get,
Router,
};
use crate::modes::server::common::AppState;
pub fn add_routes(router: Router<AppState>) -> Router<AppState> {
router
// Status endpoints
.route("/api/status", get(status::handle_status))
// Item endpoints
.route("/api/item/", get(item::handle_list_items).post(item::handle_post_item))
.route("/api/item/latest", get(item::handle_get_item_latest))
.route("/api/item/latest/meta", get(item::handle_get_item_latest_meta))
.route("/api/item/latest/content", get(item::handle_get_item_latest_content))
.route("/api/item/:id", get(item::handle_get_item).delete(item::handle_delete_item))
.route("/api/item/:id/meta", get(item::handle_get_item_meta))
.route("/api/item/:id/content", get(item::handle_get_item_content))
}