fix: update last accessed at on open file

This commit is contained in:
2025-10-21 23:54:25 +00:00
parent a862442979
commit af5d887bd1

View File

@@ -251,9 +251,14 @@ export async function openFile(
}
}
const newFileShare = await FilePreview.create(ctx, {
storageId: file.storageId,
})
const [newFileShare] = await Promise.all([
FilePreview.create(ctx, {
storageId: file.storageId,
}),
ctx.db.patch(fileId, {
lastAccessedAt: Date.now(),
}),
])
return {
file,