first commit of refactor
This commit is contained in:
18
backend/api/routes/alerts.js
Normal file
18
backend/api/routes/alerts.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import express from 'express';
|
||||
import { authenticate } from '../../middleware/authenticate.js';
|
||||
import * as AlertRuleController from '../../controllers/AlertRuleController.js';
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.use(authenticate);
|
||||
|
||||
router.post('/:addressId/alerts', AlertRuleController.create);
|
||||
|
||||
router.get('/:addressId/alerts', AlertRuleController.listByAddress);
|
||||
|
||||
router.patch('/:alertId', AlertRuleController.updateStatus);
|
||||
|
||||
router.delete('/:alertId', AlertRuleController.remove);
|
||||
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user