Compare commits

..

No commits in common. "45fcc618c2eebe3b509b04d0f8fbdf5fed054dba" and "dbfb1de4c88136625cb3a894070e30ebe8a5185a" have entirely different histories.

2 changed files with 25 additions and 26 deletions

@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
labels: ''
assignees: ''
---

@ -31,15 +31,15 @@ import { NextApiRequest, NextApiResponse } from "next";
export default async function handler(
req: NextApiRequest,
res: NextApiResponse,
res: NextApiResponse
) {
const betterStackResult = await fetch(
`https://uptime.betterstack.com/api/v2/status-pages/${process.env.BS_STATUS_PAGE}/status-reports`,
{ headers: { Authorization: `Bearer ${process.env.BS_TOKEN}` } },
{ headers: { Authorization: `Bearer ${process.env.BS_TOKEN}` } }
);
const betterStackURL = await fetch(
`https://uptime.betterstack.com/api/v2/status-pages/${process.env.BS_STATUS_PAGE}`,
{ headers: { Authorization: `Bearer ${process.env.BS_TOKEN}` } },
{ headers: { Authorization: `Bearer ${process.env.BS_TOKEN}` } }
);
const result = await betterStackResult.json();
@ -50,9 +50,8 @@ export default async function handler(
c.attributes.ends_at === null &&
c.attributes.affected_resources.filter(
(v: any) =>
v.status_page_resource_id === process.env.BS_STATUS_MAIN_WEBSITE &&
v.status !== "resolved",
).length > 0,
v.status_page_resource_id === process.env.BS_STATUS_MAIN_WEBSITE
).length > 0
);
res.status(200).send({