Added basic actor page with scenes and co-star filtering.
This commit is contained in:
@@ -20,7 +20,8 @@ import { renderPage } from 'vike/server'; // eslint-disable-line import/extensio
|
||||
|
||||
// import root from './root.js';
|
||||
|
||||
import { fetchActorsApi } from './actors.js'; // eslint-disable-line import/extensions
|
||||
import { fetchScenesApi } from './scenes.js';
|
||||
import { fetchActorsApi } from './actors.js';
|
||||
|
||||
const isProduction = process.env.NODE_ENV === 'production';
|
||||
|
||||
@@ -60,6 +61,8 @@ async function startServer() {
|
||||
|
||||
router.get('/api/actors', fetchActorsApi);
|
||||
|
||||
router.get('/api/scenes', fetchScenesApi);
|
||||
|
||||
// ...
|
||||
// Other middlewares (e.g. some RPC middleware such as Telefunc)
|
||||
// ...
|
||||
@@ -75,6 +78,10 @@ async function startServer() {
|
||||
const pageContext = await renderPage(pageContextInit);
|
||||
const { httpResponse } = pageContext;
|
||||
|
||||
if (pageContext.errorWhileRendering) {
|
||||
console.error(pageContext.errorWhileRendering);
|
||||
}
|
||||
|
||||
if (!httpResponse) {
|
||||
next();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user