add: added mentions

This commit is contained in:
Lukian 2025-04-05 17:33:23 +02:00
parent dfb6639ecf
commit 6c8f354bf6
9 changed files with 208 additions and 9 deletions

14
back/api/searchuser.js Normal file
View file

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