add: changed homepage to display most active channels

This commit is contained in:
Lukian 2025-04-04 21:31:29 +02:00
parent 411aa149ac
commit dfb6639ecf
10 changed files with 179 additions and 14 deletions

View file

@ -0,0 +1,14 @@
const express = require('express');
const { getConnection, searchChannels } = require('../libs/mysql');
const router = express.Router();
router.get('/', async (req, res) => {
const { search } = req.query;
const connection = await getConnection();
const channels = await searchChannels(connection, search);
connection.end();
res.send(channels);
});
module.exports = router;