Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F41989686
serviceModel.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
423 B
Referenced Files
None
Subscribers
None
serviceModel.js
View Options
const
pool
=
require
(
'../config/database.js'
);
const
addService
=
async
(
data
)
=>
{
return
await
pool
.
query
(
`
INSERT INTO service
(name, "group", description, status)
VALUES (\$1, \$2, \$3, \$4)
RETURNING *
`
,
[
data
.
name
,
data
.
group
,
data
.
description
,
data
.
status
]);
};
const
getServices
=
async
()
=>
{
return
await
pool
.
query
(
`
SELECT * FROM service;
`
);
};
module
.
exports
=
{
addService
,
getServices
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 8, 09:04 (43 m, 18 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3951521
Default Alt Text
serviceModel.js (423 B)
Attached To
Mode
rSP ServPulse
Attached
Detach File
Event Timeline
Log In to Comment