mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-12 23:01:07 +00:00
order by savedAt
This commit is contained in:
parent
560363bf10
commit
e99041443a
2 changed files with 2 additions and 4 deletions
|
|
@ -159,7 +159,7 @@ export async function fetchContentForSpace(
|
|||
exists(
|
||||
db.select().from(contentToSpace).where(and(eq(contentToSpace.spaceId, spaceId), eq(contentToSpace.contentId, storedContent.id))),
|
||||
),
|
||||
).orderBy(asc(storedContent.title))
|
||||
).orderBy(asc(storedContent.savedAt))
|
||||
|
||||
return range ? await query.limit(range.limit).offset(range.offset) : await query.all()
|
||||
}
|
||||
|
|
@ -188,7 +188,7 @@ export async function fetchFreeMemories(
|
|||
eq(storedContent.user, user.id),
|
||||
)
|
||||
|
||||
).orderBy(asc(storedContent.title))
|
||||
).orderBy(asc(storedContent.savedAt))
|
||||
|
||||
return range ? await query.limit(range.limit).offset(range.offset) : await query.all()
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@ import {
|
|||
} from "../../types/memory";
|
||||
import { MemoryProvider } from "@/contexts/MemoryContext";
|
||||
import Content from "./content";
|
||||
import { searchMemoriesAndSpaces } from "@/actions/db";
|
||||
import { getMetaData } from "@/server/helpers";
|
||||
|
||||
export const runtime = "edge";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue