mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-02-09 02:29:59 +00:00
15 lines
413 B
JavaScript
15 lines
413 B
JavaScript
const router = require('express').Router();
|
|
const SystemInformation = require('../../models/system-information');
|
|
|
|
router.post('/', async(req, res) => {
|
|
const sysInfo = await SystemInformation.add(req.body);
|
|
res.status(201).json(sysInfo);
|
|
});
|
|
|
|
router.get('/', async(req, res) => {
|
|
const [sysInfo] = await SystemInformation.retrieveAll();
|
|
res.status(200).json(sysInfo || {});
|
|
});
|
|
|
|
module.exports = router;
|