feat: bare client for non-auth apis

This commit is contained in:
DarkSky
2022-12-22 19:05:16 +08:00
parent c2ce4927c8
commit 593bb77921
7 changed files with 53 additions and 47 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { request } from '../request';
import { client } from '../request';
export interface GetUserByEmailParams {
email: string;
@@ -16,5 +16,5 @@ export interface User {
export async function getUserByEmail(
params: GetUserByEmailParams
): Promise<User | null> {
return request.get('/api/user', { json: params }).json<User | null>();
return client.get('/api/user', { json: params }).json<User | null>();
}