chore: cleanup
This commit is contained in:
parent
1a262c4ca8
commit
295f290efd
2 changed files with 29 additions and 25 deletions
|
|
@ -952,15 +952,15 @@ export default function Layout(props: ParentProps) {
|
|||
.then((x) => x.data ?? [])
|
||||
.catch(() => [])
|
||||
|
||||
const pending = sessions.filter((session) => session.time.archived === undefined)
|
||||
if (pending.length > 0) {
|
||||
if (sessions.length > 0) {
|
||||
const archivedAt = Date.now()
|
||||
await Promise.all(
|
||||
pending.map((session) =>
|
||||
sessions.map((session) =>
|
||||
globalSDK.client.session
|
||||
.update({
|
||||
sessionID: session.id,
|
||||
directory: session.directory,
|
||||
time: { archived: Date.now() },
|
||||
time: { archived: archivedAt },
|
||||
})
|
||||
.catch(() => undefined),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue