Signed-off-by: Traxus <shyidx@gmail.com>

This commit is contained in:
Traxus 2023-04-21 20:05:19 -04:00
parent 2b2ae6a53a
commit 8e40749101

View File

@ -42,34 +42,10 @@ export async function datocmsQueryIntercept(query : any) : Promise<object> {
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;