fix: improved searchs

This commit is contained in:
Lukian 2025-05-12 11:44:49 +02:00
parent b2d8acaa5d
commit 8d6e1f8618
3 changed files with 3 additions and 3 deletions

View file

@ -46,7 +46,7 @@ const router = express.Router();
router.get('/', async (req, res) => {
const { search } = req.query;
const connection = await getConnection();
if (search) {
if (search || search === '') {
const channels = await searchChannels(connection, search);
connection.end();
return res.send(channels);

View file

@ -29,7 +29,7 @@ upload.limits = {
router.get('/', async (req, res) => {
const { search } = req.query;
const connection = await getConnection();
if (search) {
if (search || search === '') {
const emojis = await searchEmojis(connection, search);
connection.end();
return res.send(emojis);

View file

@ -21,7 +21,7 @@ const router = express.Router();
router.get('/', async (req, res) => {
const { search } = req.query;
const connection = await getConnection();
if (search) {
if (search || search === '') {
const users = await searchUser(connection, search);
connection.end();
return res.send(users);