Optionally showing aliases in actors admin.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { render } from 'vike/abort'; /* eslint-disable-line import/extensions */
|
||||
|
||||
import { fetchActors } from '#/src/actors.js';
|
||||
import { curateActorsQuery } from '#/src/web/actors.js';
|
||||
import verifyAbility from '#/utils/verify-ability.js';
|
||||
|
||||
export default async function onBeforeRender(pageContext) {
|
||||
@@ -8,9 +9,7 @@ export default async function onBeforeRender(pageContext) {
|
||||
throw render(404);
|
||||
}
|
||||
|
||||
const { actors } = await fetchActors({
|
||||
query: pageContext.urlParsed.search.q,
|
||||
}, {
|
||||
const { actors } = await fetchActors(curateActorsQuery(pageContext.urlParsed.search), {
|
||||
limit: 100,
|
||||
order: pageContext.urlParsed.search.order?.split('.') || ['likes', 'desc'],
|
||||
}, pageContext.user);
|
||||
|
||||
Reference in New Issue
Block a user