mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-09 12:44:58 -05:00
Compare commits
8 Commits
a3c85abdbc
...
9369870d6c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9369870d6c | ||
|
|
fd278b3e8d | ||
|
|
b3d2763106 | ||
|
|
8538ac5672 | ||
|
|
45fcc618c2 | ||
|
|
7e7c1a8648 | ||
|
|
17f444fbf4 | ||
|
|
4b2e878cca |
@ -28,6 +28,10 @@ The primary stack for MHSF is Next.js, a React framework, which you can start by
|
|||||||
[You can also opt out of telemetry if you'd like.](https://nextjs.org/telemetry)
|
[You can also opt out of telemetry if you'd like.](https://nextjs.org/telemetry)
|
||||||
|
|
||||||
## Clerk
|
## Clerk
|
||||||
|
> [!CAUTION]
|
||||||
|
> Clerk is no longer optional. If Clerk is not setup, you *will* get a `Non-authenticated environments are disallowed on this origin.` error on the frontend.
|
||||||
|
> You may be able to modify/test API endpoints as long as they do not require accounts.
|
||||||
|
|
||||||
If you want to test out accounts, [you must create an Clerk key from their website.](https://clerk.com)
|
If you want to test out accounts, [you must create an Clerk key from their website.](https://clerk.com)
|
||||||
Set the following variables in the .env.local file:
|
Set the following variables in the .env.local file:
|
||||||
```dotenv
|
```dotenv
|
||||||
|
|||||||
@ -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,8 +50,9 @@ 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 &&
|
||||||
).length > 0
|
v.status !== "resolved",
|
||||||
|
).length > 0,
|
||||||
);
|
);
|
||||||
|
|
||||||
res.status(200).send({
|
res.status(200).send({
|
||||||
|
|||||||
@ -8173,9 +8173,9 @@ typed-array-length@^1.0.6:
|
|||||||
possible-typed-array-names "^1.0.0"
|
possible-typed-array-names "^1.0.0"
|
||||||
|
|
||||||
typescript@^5:
|
typescript@^5:
|
||||||
version "5.4.5"
|
version "5.7.3"
|
||||||
resolved "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.3.tgz#919b44a7dbb8583a9b856d162be24a54bf80073e"
|
||||||
integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==
|
integrity sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==
|
||||||
|
|
||||||
ufo@^1.5.3:
|
ufo@^1.5.3:
|
||||||
version "1.5.4"
|
version "1.5.4"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user