Add deletedAt timestamps to delete operations for better audit tracking
- Updated delete methods across hooks and components to include `deletedAt: System.timeStampInSeconds()`. - Refactored synchronized delete logic to pass `deletedAt` for both offline and online states. - Improved synchronization workflows to include `deletedAt` in server and IPC requests. - Enhanced destructuring patterns for cleaner and more consistent request data.
This commit is contained in:
@@ -275,10 +275,12 @@ export default function useSyncSeries() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Refreshes the sync status of all series by comparing local and server data.
|
||||
* Updates the context with the latest sync information.
|
||||
*/
|
||||
async function syncAllFromServer(): Promise<void> {
|
||||
for (const diff of seriesToSyncFromServer) {
|
||||
await syncFromServer(diff.id);
|
||||
}
|
||||
}
|
||||
|
||||
async function refreshSeries(): Promise<void> {
|
||||
try {
|
||||
let localSeriesResponse: SyncedSeries[] = [];
|
||||
@@ -343,6 +345,7 @@ export default function useSyncSeries() {
|
||||
syncFromServer,
|
||||
syncToServer,
|
||||
syncAllToServer,
|
||||
syncAllFromServer,
|
||||
refreshSeries,
|
||||
localOnlySeries,
|
||||
serverOnlySeries,
|
||||
|
||||
Reference in New Issue
Block a user