Änderungen in der Suche
This commit is contained in:
@@ -9,6 +9,7 @@ const { fullTextSearch, getAvailableTables, getTableColumns, SEARCH_CONFIG } = r
|
||||
router.get('/', async (req, res) => {
|
||||
try {
|
||||
const searchTerm = req.query.q;
|
||||
const statusFilter = req.query.status; // '' | 'aktiv' | 'pruefbar' | 'inaktiv'
|
||||
|
||||
if (!searchTerm) {
|
||||
return res.status(400).json({
|
||||
@@ -17,7 +18,7 @@ router.get('/', async (req, res) => {
|
||||
});
|
||||
}
|
||||
|
||||
const results = await fullTextSearch(searchTerm);
|
||||
const results = await fullTextSearch(searchTerm, statusFilter);
|
||||
|
||||
const totalMatches = results.reduce((sum, table) => sum + table.matchCount, 0);
|
||||
const tableErrors = results.filter(table => table && table.error);
|
||||
|
||||
Reference in New Issue
Block a user