fix: query params error

This commit is contained in:
DiamondThree
2022-12-23 18:28:43 +08:00
parent 6ed9279153
commit 7e120eca06
+2 -1
View File
@@ -16,5 +16,6 @@ export interface User {
export async function getUserByEmail(
params: GetUserByEmailParams
): Promise<User | null> {
return client.get('/api/user', { json: params }).json<User | null>();
const searchParams = new URLSearchParams({ ...params });
return client.get('/api/user', { searchParams }).json<User | null>();
}