fix(striker-ui-api): make /alert-override, /mail-recipient available

main
Tsu-ba-me 11 months ago
parent e64b9dbf91
commit 4a7feae98a
  1. 20
      striker-ui-api/src/routes/alert-override.ts
  2. 4
      striker-ui-api/src/routes/index.ts
  3. 20
      striker-ui-api/src/routes/mail-recipient.ts

@ -0,0 +1,20 @@
import express from 'express';
import {
createAlertOverride,
deleteAlertOverride,
getAlertOverride,
getAlertOverrideDetail,
updateAlertOverride,
} from '../lib/request_handlers/alert-override';
const router = express.Router();
router
.delete('/:uuid', deleteAlertOverride)
.get('/', getAlertOverride)
.get('/:uuid', getAlertOverrideDetail)
.post('/', createAlertOverride)
.put('/:uuid', updateAlertOverride);
export default router;

@ -1,3 +1,4 @@
import alertOverrideRouter from './alert-override';
import anvilRouter from './anvil';
import authRouter from './auth';
import commandRouter from './command';
@ -7,6 +8,7 @@ import fileRouter from './file';
import hostRouter from './host';
import initRouter from './init';
import jobRouter from './job';
import mailRecipientRouter from './mail-recipient';
import mailServerRouter from './mail-server';
import manifestRouter from './manifest';
import networkInterfaceRouter from './network-interface';
@ -18,12 +20,14 @@ import userRouter from './user';
const routes = {
private: {
'alert-override': alertOverrideRouter,
anvil: anvilRouter,
command: commandRouter,
fence: fenceRouter,
file: fileRouter,
host: hostRouter,
job: jobRouter,
'mail-recipient': mailRecipientRouter,
'mail-server': mailServerRouter,
manifest: manifestRouter,
'network-interface': networkInterfaceRouter,

@ -0,0 +1,20 @@
import express from 'express';
import {
createMailRecipient,
deleteMailRecipient,
getMailRecipient,
getMailRecipientDetail,
updateMailRecipient,
} from '../lib/request_handlers/mail-recipient';
const router = express.Router();
router
.delete('/:uuid', deleteMailRecipient)
.get('/', getMailRecipient)
.get('/:uuid', getMailRecipientDetail)
.post('/', createMailRecipient)
.put('/:uuid', updateMailRecipient);
export default router;
Loading…
Cancel
Save