From 8e40749101e1f364f519db538d5b40a190a92d37 Mon Sep 17 00:00:00 2001 From: Traxus Date: Fri, 21 Apr 2023 20:05:19 -0400 Subject: [PATCH] Signed-off-by: Traxus --- src/lib/datocms-bypass.ts | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/src/lib/datocms-bypass.ts b/src/lib/datocms-bypass.ts index 4a58f27..bc13908 100644 --- a/src/lib/datocms-bypass.ts +++ b/src/lib/datocms-bypass.ts @@ -42,34 +42,10 @@ export async function datocmsQueryIntercept(query : any) : Promise { return interceptData; } -function getPageQueryBypassWhitelist() : string[] { - //-----stuff that has been (to the best of my knowledge) completley pulled over into JSON - //-----does not include iterative stuff like blog posts or events etc... - //-----this may only end up being scaffolding. - - let whitelist : string [] = []; - - whitelist.push('aboutPage'); - whitelist.push('careersPage'); - whitelist.push('communityPage'); - whitelist.push('contactPage'); - whitelist.push('homePage'); - whitelist.push('partnersPage'); - whitelist.push('pressPage'); - whitelist.push('privacyPage'); - whitelist.push('productsPage'); - whitelist.push('termsPage'); - - whitelist.push('header'); - whitelist.push('footer'); - - return whitelist; -} - function getListingQueryDirectories() : string[] { //-----whitelist the listying types of content... - let directories : string[] = []; + let directories : any[] = []; directories.push('allEvents'); directories.push('allPositions'); @@ -84,11 +60,11 @@ function getListingQueryDirectories() : string[] { function getListingDirectoryByQueryParent(parent : string) : string { //-----this acts as a whitelist and a mapping to the folder name... - let directories : string[] = getListingQueryDirectories() ; - let directory : any = ''; + let directories : any[] = getListingQueryDirectories(); + let directory : string = ''; if (directories.includes(parent)) { - directory = directories[parent]; + directory = directories[parent]; } return directory;