update
Some checks failed
Rust CI / Build Release (push) Has been cancelled
Rust CI / Cargo Check (push) Has been cancelled

This commit is contained in:
lychang
2026-07-19 15:04:22 +08:00
parent b915e69222
commit 82653c1a6c
40 changed files with 7778 additions and 1 deletions

15
src/routes/pipeline.rs Normal file
View File

@@ -0,0 +1,15 @@
use crate::db::Database;
use crate::engine::pipeline;
use actix_web::{HttpResponse, Responder, web};
use std::sync::Arc;
/// POST /api/pipeline/run — 处理所有相册元数据(提取人名+标签)
pub async fn pipeline_run(db: web::Data<Arc<Database>>) -> impl Responder {
let (persons, tags) = pipeline::process_all_albums(db.get_ref()).await;
HttpResponse::Ok().json(serde_json::json!({
"success": true,
"persons_updated": persons,
"tags_updated": tags,
"message": format!("处理完成:{} 个人名,{} 个标签", persons, tags)
}))
}