export const createMyApi = (baseUrl, getTokenFunction) => {
const newBaseQuery = fetchBaseQuery({
baseUrl,
prepareHeaders: (headers) => {
headers.set('Authorization', `Bearer ${getTokenFunction()}`);
return headers;
},
});
return ???
};