|
import { render } from 'vike/abort'; /* eslint-disable-line import/extensions */
|
|
|
|
export function onBeforeRender(pageContext) {
|
|
if (pageContext.user.role === 'user') {
|
|
throw render(404);
|
|
}
|
|
|
|
return {
|
|
pageContext: {
|
|
title: pageContext.routeParams.section,
|
|
},
|
|
};
|
|
}
|