[status page] create incident

This commit is contained in:
LouisLam 2021-09-16 22:48:28 +08:00
parent 8230cfe13f
commit 2955abb5d9
13 changed files with 273 additions and 60 deletions

View file

@ -38,7 +38,10 @@ router.get("/api/status-page/incident", async (_, response) => {
try {
await checkPublished();
// TODO:
response.json({
ok: true,
incident: (await R.findOne("incident", " pin = 1 AND active = 1")).toPublicJSON(),
})
} catch (error) {
send403(response, error.message);