Compare commits

...

2 Commits

Author SHA1 Message Date
3209ce1cd2 chore: remove unused import 2025-10-21 23:58:18 +00:00
af5d887bd1 fix: update last accessed at on open file 2025-10-21 23:54:25 +00:00
2 changed files with 8 additions and 4 deletions

View File

@@ -1,6 +1,5 @@
import { createFileRoute, Outlet } from "@tanstack/react-router"
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar"
import { Toaster } from "@/components/ui/sonner"
import { DashboardSidebar } from "@/dashboard/dashboard-sidebar"
export const Route = createFileRoute("/_authenticated/_sidebar-layout")({

View File

@@ -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,