Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F41924519
incidentController.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
722 B
Referenced Files
None
Subscribers
None
incidentController.js
View Options
// incidentController.js
const
incidentModel
=
require
(
'../models/incidentModel.js'
);
const
incidentServiceModel
=
require
(
'../models/incidentServiceModel.js'
);
const
incidentPostModel
=
require
(
'../models/incidentPostModel.js'
);
const
incidentPostStatusModel
=
require
(
'../models/incidentPostStatusModel.js'
);
const
getIncidents
=
async
(
req
,
res
)
=>
{
try
{
const
incidents
=
await
incidentModel
.
getIncidents
();
res
.
status
(
200
).
json
(
incidents
);
}
catch
(
error
)
{
res
.
status
(
500
).
json
({
message
:
'Error fetching services'
,
error
:
error
.
message
});
}
};
// ... CRUD methods for incident controller using the respective models
module
.
exports
=
{
getIncidents
,
/* ... CRUD methods for incident controller */
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 8, 03:09 (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3938822
Default Alt Text
incidentController.js (722 B)
Attached To
Mode
rSP ServPulse
Attached
Detach File
Event Timeline
Log In to Comment