fix: encode search params #282

This commit is contained in:
shuai 2023-08-25 18:04:15 +08:00
parent b608ae6faf
commit af8d6cc7cf
1 changed files with 3 additions and 1 deletions

View File

@ -72,7 +72,9 @@ export const addComment = (params) => {
};
export const queryTags = (tag: string) => {
return request.get(`/answer/api/v1/question/tags?tag=${tag}`);
return request.get(
`/answer/api/v1/question/tags?tag=${encodeURIComponent(tag)}`,
);
};
export const useQueryAnswerInfo = (id: string) => {