mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-11 02:13:48 +00:00
efe5ac16f2
rename automations > triggers rename blueprints > automations chore: add link to documentation
38 lines
1.0 KiB
TypeScript
38 lines
1.0 KiB
TypeScript
import express from 'express';
|
|
|
|
import {
|
|
deleteTrigger,
|
|
deleteAutomation,
|
|
editAutomation,
|
|
getAutomationSettings,
|
|
postTrigger,
|
|
postAutomation,
|
|
putTrigger,
|
|
postAutomationSettings,
|
|
testOutput,
|
|
} from './automation.controller.js';
|
|
import {
|
|
paramContainsId,
|
|
validateAutomationSettings,
|
|
validateAutomation,
|
|
validateAutomationPatch,
|
|
validateTestPayload,
|
|
validateTrigger,
|
|
validateTriggerPatch,
|
|
} from './automation.validation.js';
|
|
|
|
export const router = express.Router();
|
|
|
|
router.get('/', getAutomationSettings);
|
|
router.post('/', validateAutomationSettings, postAutomationSettings);
|
|
|
|
router.post('/trigger', validateTrigger, postTrigger);
|
|
router.put('/trigger/:id', validateTriggerPatch, putTrigger);
|
|
router.delete('/trigger/:id', paramContainsId, deleteTrigger);
|
|
|
|
router.post('/automation', validateAutomation, postAutomation);
|
|
router.put('/automation/:id', validateAutomationPatch, editAutomation);
|
|
router.delete('/automation/:id', paramContainsId, deleteAutomation);
|
|
|
|
router.post('/test', validateTestPayload, testOutput);
|