Add favourited_by and reblogged_by controllers

This commit is contained in:
Alex Gleason
2023-08-29 18:08:00 -05:00
parent 9b761ff960
commit b27b84e3fb
4 changed files with 56 additions and 5 deletions

View File

@@ -75,7 +75,7 @@ type PaginationParams = z.infer<typeof paginationSchema>;
/** Build HTTP Link header for Mastodon API pagination. */
function buildLinkHeader(url: string, events: Event[]): string | undefined {
if (!events.length) return;
if (events.length <= 1) return;
const firstEvent = events[0];
const lastEvent = events[events.length - 1];