From 99e01d3e1069249b24b70f492c5e7063cac97cce Mon Sep 17 00:00:00 2001 From: James Pretorius Date: Tue, 23 Jan 2024 10:24:48 -0500 Subject: [PATCH] Fix leading and trailing space search bug --- FU.SPA/src/services/searchService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FU.SPA/src/services/searchService.js b/FU.SPA/src/services/searchService.js index f3140a9e..0445992c 100644 --- a/FU.SPA/src/services/searchService.js +++ b/FU.SPA/src/services/searchService.js @@ -9,7 +9,7 @@ import AuthService from './authService'; */ const searchPosts = async (query) => { let queryString = ''; - queryString += 'keywords=' + encodeURIComponent(query.keywords); + queryString += 'keywords=' + encodeURIComponent(query.keywords.trim()); if (query.games.length > 0) { queryString += '&games=' + query.games.map((g) => String(g.id)).join(','); }