Add 'exists' flags to content types and set them

This commit is contained in:
itsfinniii
2026-03-20 16:55:33 +01:00
parent 4bb3fa3671
commit b6f3fdd15e
10 changed files with 36 additions and 9 deletions

View File

@@ -22,6 +22,7 @@ export async function getPage(settings: GlobalSettings, route: string): Promise<
pageType: "BlogIndex",
page: {
type: "BlogIndex",
exists: true,
pageNumber: params["page"] !== undefined ? Number(params["page"]) : 1
}
};
@@ -63,6 +64,7 @@ export async function getPage(settings: GlobalSettings, route: string): Promise<
pageType: "ProjectIndex",
page: {
type: "ProjectIndex",
exists: true,
pageNumber: params["page"] !== undefined ? Number(params["page"]) : 1
}
};
@@ -93,7 +95,8 @@ export async function getPage(settings: GlobalSettings, route: string): Promise<
route: route,
pageType: "PhotoCategoryIndex",
page: {
type: "PhotoCategoryIndex"
type: "PhotoCategoryIndex",
exists: true
}
};
}
@@ -114,6 +117,7 @@ export async function getPage(settings: GlobalSettings, route: string): Promise<
pageType: "PhotoCategory",
page: {
type: "PhotoCategory",
exists: true,
category: params["category"],
pageNumber: params["page"] !== undefined ? Number(params["page"]) : 1
}
@@ -160,6 +164,8 @@ export async function getPage(settings: GlobalSettings, route: string): Promise<
pageType: "Photo",
page: {
type: "PhotoPage",
exists: true,
id: photo!.id,
photo: photo!.photo,
text: photo!.text