Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F49451787
incidentRoutes.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
684 B
Referenced Files
None
Subscribers
None
incidentRoutes.js
View Options
const
express
=
require
(
'express'
);
const
router
=
express
.
Router
();
const
incidentController
=
require
(
'../controllers/incidentController.js'
);
const
{
authenticate
}
=
require
(
'../middleware/auth.js'
);
router
.
get
(
'/incidents'
,
incidentController
.
getIncidents
);
router
.
get
(
'/incidents/:id'
,
incidentController
.
getIncidentById
);
router
.
post
(
'/incidents'
,
authenticate
,
incidentController
.
createIncident
);
router
.
put
(
'/incidents/:id'
,
authenticate
,
incidentController
.
updateIncident
);
router
.
put
(
'/incidents/:id/resolve'
,
authenticate
,
incidentController
.
resolveIncident
);
// Legacy endpoint
router
.
get
(
'/incident/getAll'
,
incidentController
.
getIncidents
);
module
.
exports
=
router
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 14, 08:55 (20 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4029076
Default Alt Text
incidentRoutes.js (684 B)
Attached To
Mode
rSP ServPulse
Attached
Detach File
Event Timeline
Log In to Comment