fix: update checkin_api to use Completed status
修復: - checkin: 使用 Completed 而不是 Indexed - checkout: 使用 Completed 而不是 CheckedOut 原因: - 已簡化狀態為 Scanning 和 Completed - 移除了 Indexed 和 CheckedOut 狀態
This commit is contained in:
@@ -40,11 +40,11 @@ async fn checkin_handler(
|
|||||||
Ok(result) => {
|
Ok(result) => {
|
||||||
if let Err(e) = state
|
if let Err(e) = state
|
||||||
.db
|
.db
|
||||||
.update_video_status(&file_uuid, VideoStatus::Indexed)
|
.update_video_status(&file_uuid, VideoStatus::Completed)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
tracing::warn!(
|
tracing::warn!(
|
||||||
"Failed to update video status to Indexed for {}: {}",
|
"Failed to update video status to Completed for {}: {}",
|
||||||
file_uuid,
|
file_uuid,
|
||||||
e
|
e
|
||||||
);
|
);
|
||||||
@@ -54,7 +54,7 @@ async fn checkin_handler(
|
|||||||
pre_chunks_moved: result.pre_chunks_moved,
|
pre_chunks_moved: result.pre_chunks_moved,
|
||||||
speaker_detections_moved: result.speaker_detections_moved,
|
speaker_detections_moved: result.speaker_detections_moved,
|
||||||
vectors_moved: result.vectors_moved,
|
vectors_moved: result.vectors_moved,
|
||||||
status: "indexed".to_string(),
|
status: "completed".to_string(),
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
Err(e) => Err((
|
Err(e) => Err((
|
||||||
@@ -75,11 +75,11 @@ async fn checkout_handler(
|
|||||||
Ok(result) => {
|
Ok(result) => {
|
||||||
if let Err(e) = state
|
if let Err(e) = state
|
||||||
.db
|
.db
|
||||||
.update_video_status(&file_uuid, VideoStatus::CheckedOut)
|
.update_video_status(&file_uuid, VideoStatus::Completed)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
tracing::warn!(
|
tracing::warn!(
|
||||||
"Failed to update video status to CheckedOut for {}: {}",
|
"Failed to update video status to Completed for {}: {}",
|
||||||
file_uuid,
|
file_uuid,
|
||||||
e
|
e
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user