From fa5f7fbe9217de97309d72ea070b8f98d96cae0a Mon Sep 17 00:00:00 2001 From: Ardeman Date: Mon, 24 Mar 2025 19:55:47 +0800 Subject: [PATCH] feat: modify query parameter formatting in getNews API to replace spaces with plus signs --- app/apis/common/get-news.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/apis/common/get-news.ts b/app/apis/common/get-news.ts index b2340d1..86e37b9 100644 --- a/app/apis/common/get-news.ts +++ b/app/apis/common/get-news.ts @@ -55,7 +55,7 @@ export const getNews = async (parameters?: TParameters) => { ...(active && { active }), ...(limit && { limit }), ...(page && { page }), - ...(query && { q: query }), + ...(query && { q: query.split(' ').join('+') }), }, }) return dataResponseSchema.parse(data)