diff --git a/backend/src/routes/management.js b/backend/src/routes/management.js index fad8115..5991b5b 100644 --- a/backend/src/routes/management.js +++ b/backend/src/routes/management.js @@ -611,12 +611,13 @@ router.delete('/:token', async (req, res) => { await dbManager.run('DELETE FROM groups WHERE group_id = ?', [groupId]); // Create deletion_log entry - await deletionLogRepository.logDeletion({ + await deletionLogRepository.createDeletionEntry({ groupId: groupId, - deletedBy: 'user_self_service', - reason: 'User-initiated deletion via management token', - deletionDate: new Date().toISOString(), - imageCount: imageCount + year: groupData.year, + imageCount: imageCount, + uploadDate: groupData.uploadDate, + deletionReason: 'user_self_service_deletion', + totalFileSize: groupData.images.reduce((sum, img) => sum + (img.fileSize || 0), 0) }); console.log(`✓ Group ${groupId} deleted via management token (${imageCount} images)`);