Added pagination and total to revisions.
This commit is contained in:
@@ -10,12 +10,14 @@ export async function onBeforeRender(pageContext) {
|
||||
|
||||
const {
|
||||
revisions,
|
||||
total: revisionTotal,
|
||||
actors,
|
||||
tags,
|
||||
movies,
|
||||
} = await fetchSceneRevisions(null, {
|
||||
isFinalized: false,
|
||||
limit: 50,
|
||||
isFinalized: Object.hasOwn(pageContext.urlParsed.search, 'final'),
|
||||
limit: Number(pageContext.urlParsed.search.limit) || 100,
|
||||
page: Number(pageContext.routeParams.page) || 1,
|
||||
}, pageContext.user);
|
||||
|
||||
return {
|
||||
@@ -23,6 +25,7 @@ export async function onBeforeRender(pageContext) {
|
||||
title: pageContext.routeParams.section,
|
||||
pageProps: {
|
||||
revisions,
|
||||
revisionTotal,
|
||||
actors,
|
||||
tags,
|
||||
movies,
|
||||
|
||||
Reference in New Issue
Block a user