mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-28 03:32:20 +00:00
Log status inside of the trigger api calls
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
import * as orgIdp from "#private/routers/orgIdp";
|
||||
import * as org from "#private/routers/org";
|
||||
import * as logs from "#private/routers/auditLogs";
|
||||
import * as alertEvents from "#private/routers/alertEvents";
|
||||
|
||||
import {
|
||||
verifyApiKeyHasAction,
|
||||
@@ -40,6 +41,27 @@ import { tierMatrix } from "@server/lib/billing/tierMatrix";
|
||||
export const unauthenticated = ua;
|
||||
export const authenticated = a;
|
||||
|
||||
authenticated.post(
|
||||
"/org/:orgId/site/:siteId/trigger-alert",
|
||||
verifyApiKeyIsRoot,
|
||||
verifyApiKeyHasAction(ActionsEnum.triggerSiteAlert),
|
||||
alertEvents.triggerSiteAlert
|
||||
);
|
||||
|
||||
authenticated.post(
|
||||
"/org/:orgId/resource/:resourceId/trigger-alert",
|
||||
verifyApiKeyIsRoot,
|
||||
verifyApiKeyHasAction(ActionsEnum.triggerResourceAlert),
|
||||
alertEvents.triggerResourceAlert
|
||||
);
|
||||
|
||||
authenticated.post(
|
||||
"/org/:orgId/health-check/:healthCheckId/trigger-alert",
|
||||
verifyApiKeyIsRoot,
|
||||
verifyApiKeyHasAction(ActionsEnum.triggerHealthCheckAlert),
|
||||
alertEvents.triggerHealthCheckAlert
|
||||
);
|
||||
|
||||
authenticated.post(
|
||||
`/org/:orgId/send-usage-notification`,
|
||||
verifyApiKeyIsRoot, // We are the only ones who can use root key so its fine
|
||||
|
||||
Reference in New Issue
Block a user