mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 22:53:25 +00:00
feat: add validation for search modal
This commit is contained in:
@@ -5,7 +5,8 @@ export default class SearchesController {
|
||||
async search({ request, auth }: HttpContext) {
|
||||
const term = request.qs()?.term;
|
||||
if (!term) {
|
||||
return console.warn('qs term null');
|
||||
console.warn('qs term null');
|
||||
return { error: 'missing "term" query param' };
|
||||
}
|
||||
|
||||
const { rows } = await db.rawQuery('SELECT * FROM search_text(?, ?)', [
|
||||
|
||||
Reference in New Issue
Block a user