rtk: Add base to url and fix mock handler

This commit is contained in:
Ondrej Ezr 2024-07-18 12:47:57 +02:00 committed by Klara Simickova
parent 797ceddcd1
commit a1a49806e1
9 changed files with 3670 additions and 5233 deletions

View file

@ -117,7 +117,7 @@ import { FOOBAR_API } from '../constants';
// initialize an empty api service that we'll inject endpoints into later as needed
export const emptyFoobarApi = createApi({
reducerPath: 'foobarApi',
baseQuery: fetchBaseQuery({ baseUrl: FOO_BAR }),
baseQuery: fetchBaseQuery({ baseUrl: window.location.origin + FOO_BAR }),
endpoints: () => ({}),
});
```