mirror of
https://github.com/get-drexa/drive.git
synced 2025-11-30 21:41:39 +00:00
fix: update last accessed at on open file
This commit is contained in:
@@ -251,9 +251,14 @@ export async function openFile(
|
||||
}
|
||||
}
|
||||
|
||||
const newFileShare = await FilePreview.create(ctx, {
|
||||
const [newFileShare] = await Promise.all([
|
||||
FilePreview.create(ctx, {
|
||||
storageId: file.storageId,
|
||||
})
|
||||
}),
|
||||
ctx.db.patch(fileId, {
|
||||
lastAccessedAt: Date.now(),
|
||||
}),
|
||||
])
|
||||
|
||||
return {
|
||||
file,
|
||||
|
||||
Reference in New Issue
Block a user