tanuki-s-forum/back/api/newchannels.js

13 lines
No EOL
353 B
JavaScript

const express = require('express');
const { getConnection, getNewChannels } = require('../libs/mysql');
const router = express.Router();
router.get('/', async (req, res) => {
const connection = await getConnection();
const channels = await getNewChannels(connection);
connection.end();
res.send(channels);
});
module.exports = router;