pinakes-server: propagate sync/share errors; cap unbounded pagination
limits Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I79339740dd34353014d02f571b6f55a26a6a6964
This commit is contained in:
parent
b12ad5d272
commit
f049dd100a
3 changed files with 37 additions and 15 deletions
|
|
@ -862,7 +862,9 @@ pub async fn rename_media(
|
|||
changed_by_device: None,
|
||||
timestamp: chrono::Utc::now(),
|
||||
};
|
||||
let _ = state.storage.record_sync_change(&change).await;
|
||||
if let Err(e) = state.storage.record_sync_change(&change).await {
|
||||
tracing::warn!(error = %e, "failed to record sync change");
|
||||
}
|
||||
|
||||
// Record audit
|
||||
pinakes_core::audit::record_action(
|
||||
|
|
@ -902,7 +904,9 @@ pub async fn move_media_endpoint(
|
|||
changed_by_device: None,
|
||||
timestamp: chrono::Utc::now(),
|
||||
};
|
||||
let _ = state.storage.record_sync_change(&change).await;
|
||||
if let Err(e) = state.storage.record_sync_change(&change).await {
|
||||
tracing::warn!(error = %e, "failed to record sync change");
|
||||
}
|
||||
|
||||
// Record audit
|
||||
pinakes_core::audit::record_action(
|
||||
|
|
@ -958,7 +962,9 @@ pub async fn batch_move_media(
|
|||
changed_by_device: None,
|
||||
timestamp: chrono::Utc::now(),
|
||||
};
|
||||
let _ = state.storage.record_sync_change(&change).await;
|
||||
if let Err(e) = state.storage.record_sync_change(&change).await {
|
||||
tracing::warn!(error = %e, "failed to record sync change");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1001,7 +1007,9 @@ pub async fn soft_delete_media(
|
|||
changed_by_device: None,
|
||||
timestamp: chrono::Utc::now(),
|
||||
};
|
||||
let _ = state.storage.record_sync_change(&change).await;
|
||||
if let Err(e) = state.storage.record_sync_change(&change).await {
|
||||
tracing::warn!(error = %e, "failed to record sync change");
|
||||
}
|
||||
|
||||
// Record audit
|
||||
pinakes_core::audit::record_action(
|
||||
|
|
@ -1040,7 +1048,9 @@ pub async fn restore_media(
|
|||
changed_by_device: None,
|
||||
timestamp: chrono::Utc::now(),
|
||||
};
|
||||
let _ = state.storage.record_sync_change(&change).await;
|
||||
if let Err(e) = state.storage.record_sync_change(&change).await {
|
||||
tracing::warn!(error = %e, "failed to record sync change");
|
||||
}
|
||||
|
||||
// Record audit
|
||||
pinakes_core::audit::record_action(
|
||||
|
|
@ -1139,7 +1149,9 @@ pub async fn permanent_delete_media(
|
|||
changed_by_device: None,
|
||||
timestamp: chrono::Utc::now(),
|
||||
};
|
||||
let _ = state.storage.record_sync_change(&change).await;
|
||||
if let Err(e) = state.storage.record_sync_change(&change).await {
|
||||
tracing::warn!(error = %e, "failed to record sync change");
|
||||
}
|
||||
|
||||
// Clean up thumbnail
|
||||
if let Some(ref thumb_path) = item.thumbnail_path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue