generated from lucien/api-template
13 lines
No EOL
353 B
JavaScript
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; |