generated from lucien/api-template
fix: improved searchs
This commit is contained in:
parent
b2d8acaa5d
commit
8d6e1f8618
3 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue