export const authCheckApi = createApi({
reducerPath: 'authCheckApi',
baseQuery: fetchBaseQuery({
baseUrl: 'http://localhost:4001',
}),
endpoints: (builder) => ({
checkAuth: builder.query({
query: (username, password) => ({
url: `/user/login/`,
method: 'POST',
body: { email: username, password: password },
headers: {
'Content-type': 'application/json; charset=UTF-8',
},
}),
}),
//endPoints end braces below
}),
//main end below
});
问问题
417 次