Files
zclaw_openfang/crates/zclaw-saas/src/prompt/mod.rs
iven 5fdf96c3f5 chore: 提交所有工作进度 — SaaS 后端增强、Admin UI、桌面端集成
包含大量 SaaS 平台改进、Admin 管理后台更新、桌面端集成完善、
文档同步、测试文件重构等内容。为 QA 测试准备干净工作树。
2026-03-29 10:46:41 +08:00

20 lines
837 B
Rust

//! 提示词模板管理模块
pub mod types;
pub mod service;
pub mod handlers;
use axum::routing::{get, post};
use crate::state::AppState;
/// 提示词管理路由 (需要认证)
pub fn routes() -> axum::Router<AppState> {
axum::Router::new()
.route("/api/v1/prompts/check", post(handlers::check_updates))
.route("/api/v1/prompts", get(handlers::list_prompts).post(handlers::create_prompt))
.route("/api/v1/prompts/:name", get(handlers::get_prompt).put(handlers::update_prompt).delete(handlers::archive_prompt))
.route("/api/v1/prompts/:name/versions", get(handlers::list_versions).post(handlers::create_version))
.route("/api/v1/prompts/:name/versions/:version", get(handlers::get_version))
.route("/api/v1/prompts/:name/rollback/:version", post(handlers::rollback_version))
}