feat(drive): remove all owner_id from {File,Folder}Dto
This commit is contained in:
@@ -42,11 +42,10 @@
|
||||
const entries = $derived(
|
||||
raw.map((it): ResourceEntry => {
|
||||
const isFile = it.resource_type === 'file';
|
||||
// §14 provenance — Recent's mental model is "who touched
|
||||
// this recently", so `updated_by` (the last mutator) is
|
||||
// preferred over `created_by` (who put it in). Fall back
|
||||
// to `owner_id` for pre-D7 rows with no provenance.
|
||||
const ownerId = it.resource.updated_by ?? it.resource.owner_id ?? null;
|
||||
// §14 provenance: Recent's mental model is "who touched this
|
||||
// recently", so `updated_by` (the last mutator) is the right
|
||||
// signal — distinct from Favorites/Files which use `created_by`.
|
||||
const ownerId = it.resource.updated_by ?? null;
|
||||
return {
|
||||
id: it.resource.id,
|
||||
name: it.resource.name,
|
||||
@@ -122,7 +121,7 @@
|
||||
});
|
||||
raw = reset ? page.items : [...raw, ...page.items];
|
||||
cursor = page.next_cursor;
|
||||
void owners.resolve(page.items.map((i) => i.resource.updated_by ?? i.resource.owner_id));
|
||||
void owners.resolve(page.items.map((i) => i.resource.updated_by));
|
||||
} catch (e) {
|
||||
console.error('recent: load error', e);
|
||||
error = t('errors_loadFailed', 'Failed to load items');
|
||||
|
||||
Reference in New Issue
Block a user