mirror of
https://github.com/wassname/talk.git
synced 2026-07-01 07:10:27 +08:00
14 lines
348 B
JavaScript
14 lines
348 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const Setting = require('../../../models/setting');
|
|
|
|
router.get('/', (req, res, next) => {
|
|
Setting.getSettings().then(res.json).catch(next);
|
|
});
|
|
|
|
router.put('/', (req, res, next) => {
|
|
Setting.updateSettings(req.body).then(res.json).catch(next);
|
|
});
|
|
|
|
module.exports = router;
|