mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-19 05:14:27 +01:00
Separate listPagination
This commit is contained in:
@@ -563,7 +563,7 @@ const zapController: AppController = async (c) => {
|
||||
|
||||
const zappedByController: AppController = async (c) => {
|
||||
const id = c.req.param('id');
|
||||
const params = c.get('pagination');
|
||||
const params = c.get('listPagination');
|
||||
const store = await Storages.db();
|
||||
const db = await DittoDB.getInstance();
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import { accountFromPubkey, renderAccount } from '@/views/mastodon/accounts.ts';
|
||||
|
||||
export const suggestionsV1Controller: AppController = async (c) => {
|
||||
const signal = c.req.raw.signal;
|
||||
const params = c.get('pagination');
|
||||
const params = c.get('listPagination');
|
||||
const suggestions = await renderV2Suggestions(c, params, signal);
|
||||
const accounts = suggestions.map(({ account }) => account);
|
||||
return paginatedList(c, params, accounts);
|
||||
@@ -18,7 +18,7 @@ export const suggestionsV1Controller: AppController = async (c) => {
|
||||
|
||||
export const suggestionsV2Controller: AppController = async (c) => {
|
||||
const signal = c.req.raw.signal;
|
||||
const params = c.get('pagination');
|
||||
const params = c.get('listPagination');
|
||||
const suggestions = await renderV2Suggestions(c, params, signal);
|
||||
return paginatedList(c, params, suggestions);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user