fix test/e2e/antennas.ts

This commit is contained in:
dakkar 2025-05-13 14:36:01 +01:00
parent 2175181fa6
commit 7a2958f356
3 changed files with 22 additions and 19 deletions

View file

@ -691,3 +691,19 @@ export async function captureWebhook<T = SystemWebhookPayload>(postAction: () =>
return JSON.parse(result) as T;
}
// the packed user inside each note returned by `users/notes` has the
// latest `notesCount`, not the count at the time the note was
// created, so we override it
export function withNotesCount(notes, count) {
return notes.map( note => {
return {
...note,
user: {
...note.user,
notesCount: count,
},
};
});
}