fix: resolve trace-profile UPSERT SQL error and face-filter route syntax

- Fixed upsert_trace_profile() SQL: replaced scalar subqueries with LEFT JOIN
  to properly reference trace_profiles table in backfill logic
- Fixed face_filter routes: changed {file_uuid} to :file_uuid syntax for
  axum 0.7.9 compatibility
- Both fixes resolve HTTP 500 errors in rename and 404 errors in face filter
This commit is contained in:
Accusys
2026-08-09 23:41:11 +08:00
parent a3eba898e2
commit d6f45683a0
2 changed files with 20 additions and 22 deletions
+6 -6
View File
@@ -536,10 +536,10 @@ pub async fn get_filter_rules(
/// Create router for face filter API
pub fn face_filter_routes() -> Router<AppState> {
Router::new()
.route("/api/v1/file/{file_uuid}/face-filter/faces", get(get_faces))
.route("/api/v1/file/{file_uuid}/face-filter/{face_id}/report", get(get_face_filter_report))
.route("/api/v1/file/{file_uuid}/face-filter/apply", post(filter_faces))
.route("/api/v1/file/{file_uuid}/face-filter/stats", get(get_filter_stats))
.route("/api/v1/file/{file_uuid}/face-filter/rules", get(get_filter_rules))
.route("/api/v1/file/{file_uuid}/face-filter/rules", post(save_filter_rules))
.route("/api/v1/file/:file_uuid/face-filter/faces", get(get_faces))
.route("/api/v1/file/:file_uuid/face-filter/:face_id/report", get(get_face_filter_report))
.route("/api/v1/file/:file_uuid/face-filter/apply", post(filter_faces))
.route("/api/v1/file/:file_uuid/face-filter/stats", get(get_filter_stats))
.route("/api/v1/file/:file_uuid/face-filter/rules", get(get_filter_rules))
.route("/api/v1/file/:file_uuid/face-filter/rules", post(save_filter_rules))
}