feat: schema tracking, SHA256 integrity, identity UUID fix, 3-angle face match, cuts table, trace stranger_id
This commit is contained in:
@@ -31,6 +31,10 @@ pub fn identity_routes() -> Router<crate::api::server::AppState> {
|
||||
"/api/v1/identity/:identity_uuid/chunks",
|
||||
get(get_identity_chunks),
|
||||
)
|
||||
.route(
|
||||
"/api/v1/identity/:identity_uuid/faces",
|
||||
get(get_identity_faces),
|
||||
)
|
||||
.route("/api/v1/resource/register", post(register_resource))
|
||||
.route("/api/v1/resource/heartbeat", post(heartbeat_resource))
|
||||
.route("/api/v1/resources", get(list_resources))
|
||||
@@ -212,7 +216,7 @@ async fn get_file_identities(
|
||||
.into_iter()
|
||||
.map(|r| FileIdentityItem {
|
||||
identity_id: r.identity_id,
|
||||
identity_uuid: r.identity_uuid.map(|u| u.to_string()),
|
||||
identity_uuid: r.identity_uuid.map(|u| u.to_string().replace('-', "")),
|
||||
name: r.name,
|
||||
metadata: r.metadata,
|
||||
face_count: r.face_count,
|
||||
@@ -239,7 +243,7 @@ async fn get_file_identities(
|
||||
#[derive(Debug, Serialize)]
|
||||
pub struct IdentityDetailResponse {
|
||||
pub success: bool,
|
||||
pub uuid: Uuid,
|
||||
pub uuid: String,
|
||||
pub name: String,
|
||||
pub identity_type: Option<String>,
|
||||
pub source: Option<String>,
|
||||
@@ -273,7 +277,7 @@ async fn get_identity_detail(
|
||||
match identity {
|
||||
Some(i) => Ok(Json(IdentityDetailResponse {
|
||||
success: true,
|
||||
uuid: i.uuid,
|
||||
uuid: i.uuid.to_string().replace('-', ""),
|
||||
name: i.name,
|
||||
identity_type: i.identity_type,
|
||||
source: i.source,
|
||||
@@ -295,7 +299,7 @@ async fn get_identity_detail(
|
||||
#[derive(Debug, Serialize)]
|
||||
pub struct IdentityFilesResponse {
|
||||
pub success: bool,
|
||||
pub identity_uuid: Uuid,
|
||||
pub identity_uuid: String,
|
||||
pub total: i64,
|
||||
pub page: usize,
|
||||
pub page_size: usize,
|
||||
@@ -390,7 +394,7 @@ async fn get_identity_files(
|
||||
|
||||
Ok(Json(IdentityFilesResponse {
|
||||
success: true,
|
||||
identity_uuid: uuid,
|
||||
identity_uuid: uuid.to_string().replace('-', ""),
|
||||
total: data.len() as i64,
|
||||
page,
|
||||
page_size,
|
||||
@@ -401,7 +405,7 @@ async fn get_identity_files(
|
||||
#[derive(Debug, Serialize)]
|
||||
pub struct IdentityFacesResponse {
|
||||
pub success: bool,
|
||||
pub identity_uuid: Uuid,
|
||||
pub identity_uuid: String,
|
||||
pub total: i64,
|
||||
pub page: usize,
|
||||
pub page_size: usize,
|
||||
@@ -413,7 +417,7 @@ pub struct IdentityFaceItem {
|
||||
pub id: i64,
|
||||
pub file_uuid: String,
|
||||
pub frame_number: i64,
|
||||
pub timestamp_secs: f64,
|
||||
pub timestamp_secs: Option<f64>,
|
||||
pub face_id: Option<String>,
|
||||
pub bbox: BBox,
|
||||
pub confidence: f64,
|
||||
@@ -465,7 +469,7 @@ async fn get_identity_faces(
|
||||
|
||||
Ok(Json(IdentityFacesResponse {
|
||||
success: true,
|
||||
identity_uuid: uuid,
|
||||
identity_uuid: uuid.to_string().replace('-', ""),
|
||||
total: data.len() as i64,
|
||||
page,
|
||||
page_size,
|
||||
@@ -476,7 +480,7 @@ async fn get_identity_faces(
|
||||
#[derive(Debug, Serialize)]
|
||||
pub struct IdentityChunksResponse {
|
||||
pub success: bool,
|
||||
pub identity_uuid: Uuid,
|
||||
pub identity_uuid: String,
|
||||
pub total: i64,
|
||||
pub page: usize,
|
||||
pub page_size: usize,
|
||||
@@ -528,7 +532,7 @@ async fn get_identity_chunks(
|
||||
|
||||
Ok(Json(IdentityChunksResponse {
|
||||
success: true,
|
||||
identity_uuid: uuid,
|
||||
identity_uuid: uuid.to_string().replace('-', ""),
|
||||
total: data.len() as i64,
|
||||
page,
|
||||
page_size,
|
||||
|
||||
Reference in New Issue
Block a user