mirror of
https://github.com/fosrl/pangolin.git
synced 2026-04-18 15:56:35 +00:00
Add crud
This commit is contained in:
@@ -29,6 +29,7 @@ import * as ssh from "#private/routers/ssh";
|
||||
import * as user from "#private/routers/user";
|
||||
import * as siteProvisioning from "#private/routers/siteProvisioning";
|
||||
import * as eventStreamingDestination from "#private/routers/eventStreamingDestination";
|
||||
import * as alertRule from "#private/routers/alertRule";
|
||||
|
||||
import {
|
||||
verifyOrgAccess,
|
||||
@@ -652,3 +653,45 @@ authenticated.get(
|
||||
verifyUserHasAction(ActionsEnum.listEventStreamingDestinations),
|
||||
eventStreamingDestination.listEventStreamingDestinations
|
||||
);
|
||||
|
||||
authenticated.put(
|
||||
"/org/:orgId/alert-rule",
|
||||
verifyValidLicense,
|
||||
verifyOrgAccess,
|
||||
verifyLimits,
|
||||
verifyUserHasAction(ActionsEnum.createAlertRule),
|
||||
logActionAudit(ActionsEnum.createAlertRule),
|
||||
alertRule.createAlertRule
|
||||
);
|
||||
|
||||
authenticated.post(
|
||||
"/org/:orgId/alert-rule/:alertRuleId",
|
||||
verifyValidLicense,
|
||||
verifyOrgAccess,
|
||||
verifyUserHasAction(ActionsEnum.updateAlertRule),
|
||||
logActionAudit(ActionsEnum.updateAlertRule),
|
||||
alertRule.updateAlertRule
|
||||
);
|
||||
|
||||
authenticated.delete(
|
||||
"/org/:orgId/alert-rule/:alertRuleId",
|
||||
verifyValidLicense,
|
||||
verifyOrgAccess,
|
||||
verifyUserHasAction(ActionsEnum.deleteAlertRule),
|
||||
logActionAudit(ActionsEnum.deleteAlertRule),
|
||||
alertRule.deleteAlertRule
|
||||
);
|
||||
|
||||
authenticated.get(
|
||||
"/org/:orgId/alert-rules",
|
||||
verifyOrgAccess,
|
||||
verifyUserHasAction(ActionsEnum.listAlertRules),
|
||||
alertRule.listAlertRules
|
||||
);
|
||||
|
||||
authenticated.get(
|
||||
"/org/:orgId/alert-rule/:alertRuleId",
|
||||
verifyOrgAccess,
|
||||
verifyUserHasAction(ActionsEnum.getAlertRule),
|
||||
alertRule.getAlertRule
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user