feat(drive): remove all owner_id from {File,Folder}Dto

This commit is contained in:
Edouard Vanbelle
2026-07-03 00:48:14 +02:00
parent 29bcf48eb7
commit 37467ed9d3
33 changed files with 116 additions and 149 deletions
+4 -6
View File
@@ -40,11 +40,9 @@
const entries = $derived(
raw.map((it): ResourceEntry => {
const isFile = it.resource_type === 'file';
// §14 provenance — prefer `created_by` (who put the item
// into the system) over the deprecated `owner_id`. Fall
// back to `owner_id` for pre-D7 rows whose `created_by`
// column wasn't backfilled.
const ownerId = it.resource.created_by ?? it.resource.owner_id ?? null;
// §14 provenance: `created_by` names who put the item into
// the system (Files browser / Favorites / Shared semantic).
const ownerId = it.resource.created_by ?? null;
return {
id: it.resource.id,
name: it.resource.name,
@@ -110,7 +108,7 @@
});
raw = reset ? page.items : [...raw, ...page.items];
cursor = page.next_cursor;
void owners.resolve(page.items.map((i) => i.resource.created_by ?? i.resource.owner_id));
void owners.resolve(page.items.map((i) => i.resource.created_by));
} catch (e) {
console.error('favorites: load error', e);
error = t('errors_loadFailed', 'Failed to load items');
@@ -41,7 +41,6 @@ function withOneFile() {
mime_type: 'image/png',
modified_at: 0,
name: 'photo.png',
owner_id: 'me',
created_by: 'me',
updated_by: 'me',
folder_id: 'root',