This commit is contained in:
Laura Hausmann 2024-05-31 20:52:54 +02:00
parent fb0ebd6079
commit b961f380ef
No known key found for this signature in database
GPG Key ID: D044E84C5BE01605
2 changed files with 3 additions and 5 deletions

View File

@ -11,14 +11,14 @@ export default function (
totalItems: any,
first?: string,
last?: string,
orderedItems?: Record<string, unknown>[],
orderedItems?: (Record<string, unknown> | string)[],
): {
id: string | null;
type: "OrderedCollection";
totalItems: any;
first?: string;
last?: string;
orderedItems?: Record<string, unknown>[];
orderedItems?: (Record<string, unknown> | string)[];
} {
const page: any = {
id,

View File

@ -37,9 +37,7 @@ export default async (ctx: Router.RouterContext) => {
pinings.map((pining) => Notes.findOneByOrFail({ id: pining.noteId })),
);
const renderedNotes = await Promise.all(
pinnedNotes.map((note) => renderNote(note)),
);
const renderedNotes = pinnedNotes.map((note) => `${config.url}/notes/${note.id}`);
const rendered = renderOrderedCollection(
`${config.url}/users/${userId}/collections/featured`,