|
|
|
@ -15,11 +15,13 @@ const server = UptimeKumaServer.getInstance();
|
|
|
|
|
|
|
|
|
|
router.get("/status/:slug", cache("5 minutes"), async (request, response) => {
|
|
|
|
|
let slug = request.params.slug;
|
|
|
|
|
slug = slug.toLowerCase();
|
|
|
|
|
await StatusPage.handleStatusPageResponse(response, server.indexHTML, slug);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
router.get("/status/:slug/rss", cache("5 minutes"), async (request, response) => {
|
|
|
|
|
let slug = request.params.slug;
|
|
|
|
|
slug = slug.toLowerCase();
|
|
|
|
|
await StatusPage.handleStatusPageRSSResponse(response, slug);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -70,6 +72,7 @@ router.get("/api/status-page/:slug/summary", cache("5 minutes"), async (request,
|
|
|
|
|
router.get("/api/status-page/:slug", cache("5 minutes"), async (request, response) => {
|
|
|
|
|
allowDevAllOrigin(response);
|
|
|
|
|
let slug = request.params.slug;
|
|
|
|
|
slug = slug.toLowerCase();
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
// Get Status Page
|
|
|
|
@ -102,6 +105,7 @@ router.get("/api/status-page/heartbeat/:slug", cache("1 minutes"), async (reques
|
|
|
|
|
let uptimeList = {};
|
|
|
|
|
|
|
|
|
|
let slug = request.params.slug;
|
|
|
|
|
slug = slug.toLowerCase();
|
|
|
|
|
let statusPageID = await StatusPage.slugToID(slug);
|
|
|
|
|
|
|
|
|
|
let monitorIDList = await R.getCol(`
|
|
|
|
@ -144,6 +148,7 @@ router.get("/api/status-page/heartbeat/:slug", cache("1 minutes"), async (reques
|
|
|
|
|
router.get("/api/status-page/:slug/manifest.json", cache("1440 minutes"), async (request, response) => {
|
|
|
|
|
allowDevAllOrigin(response);
|
|
|
|
|
let slug = request.params.slug;
|
|
|
|
|
slug = slug.toLowerCase();
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
// Get Status Page
|
|
|
|
@ -178,7 +183,8 @@ router.get("/api/status-page/:slug/manifest.json", cache("1440 minutes"), async
|
|
|
|
|
// overall status-page status badge
|
|
|
|
|
router.get("/api/status-page/:slug/badge", cache("5 minutes"), async (request, response) => {
|
|
|
|
|
allowDevAllOrigin(response);
|
|
|
|
|
const slug = request.params.slug;
|
|
|
|
|
let slug = request.params.slug;
|
|
|
|
|
slug = slug.toLowerCase();
|
|
|
|
|
const statusPageID = await StatusPage.slugToID(slug);
|
|
|
|
|
const {
|
|
|
|
|
label,
|
|
|
|
|