mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-21 17:37:29 -07:00
[backend] Render pinned notes as links instead of objects
This commit is contained in:
parent
fb0ebd6079
commit
d8a75cdd08
2 changed files with 3 additions and 5 deletions
|
@ -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,
|
||||
|
|
|
@ -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`,
|
||||
|
|
Loading…
Reference in a new issue