Admin polish: stability fixes, schema security, consistent UI + sidebar #1
2 changed files with 2 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ export const load: PageServerLoad = async ({ locals }) => {
|
|||
try {
|
||||
const page = await locals.pb
|
||||
.collection('pages')
|
||||
.getFirstListItem(`slug = "${homeSlug}" && published = true`);
|
||||
.getFirstListItem(locals.pb.filter('slug = {:slug} && published = true', { slug: homeSlug }));
|
||||
let calendarEvents: CalendarEventRecord[] = [];
|
||||
if (hasUpcomingCalendarBlock(page.blocks || [])) {
|
||||
const range = getUpcomingCalendarRange();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ export const load: PageServerLoad = async ({ params, locals }) => {
|
|||
try {
|
||||
const page = await locals.pb
|
||||
.collection('pages')
|
||||
.getFirstListItem(`slug = "${params.slug}" && published = true`);
|
||||
.getFirstListItem(locals.pb.filter('slug = {:slug} && published = true', { slug: params.slug }));
|
||||
let calendarEvents: CalendarEventRecord[] = [];
|
||||
if (hasUpcomingCalendarBlock(page.blocks || [])) {
|
||||
const range = getUpcomingCalendarRange();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue