mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-09 14:25:00 -05:00
Compare commits
No commits in common. "7e7c1a86482c1dbd05f192f14cfbe79ee63a61ca" and "f2feb1ae73428a89bbb407558bdcc985bca00eea" have entirely different histories.
7e7c1a8648
...
f2feb1ae73
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -2,7 +2,7 @@
|
|||||||
name: Bug report
|
name: Bug report
|
||||||
about: Create a report to help us improve
|
about: Create a report to help us improve
|
||||||
title: ''
|
title: ''
|
||||||
labels: 'bug'
|
labels: ''
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@ -31,15 +31,15 @@ import { NextApiRequest, NextApiResponse } from "next";
|
|||||||
|
|
||||||
export default async function handler(
|
export default async function handler(
|
||||||
req: NextApiRequest,
|
req: NextApiRequest,
|
||||||
res: NextApiResponse,
|
res: NextApiResponse
|
||||||
) {
|
) {
|
||||||
const betterStackResult = await fetch(
|
const betterStackResult = await fetch(
|
||||||
`https://uptime.betterstack.com/api/v2/status-pages/${process.env.BS_STATUS_PAGE}/status-reports`,
|
`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(
|
const betterStackURL = await fetch(
|
||||||
`https://uptime.betterstack.com/api/v2/status-pages/${process.env.BS_STATUS_PAGE}`,
|
`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();
|
const result = await betterStackResult.json();
|
||||||
@ -50,9 +50,8 @@ export default async function handler(
|
|||||||
c.attributes.ends_at === null &&
|
c.attributes.ends_at === null &&
|
||||||
c.attributes.affected_resources.filter(
|
c.attributes.affected_resources.filter(
|
||||||
(v: any) =>
|
(v: any) =>
|
||||||
v.status_page_resource_id === process.env.BS_STATUS_MAIN_WEBSITE &&
|
v.status_page_resource_id === process.env.BS_STATUS_MAIN_WEBSITE
|
||||||
v.status !== "resolved",
|
).length > 0
|
||||||
).length > 0,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
res.status(200).send({
|
res.status(200).send({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user