hardcode baseurl

This commit is contained in:
Mary Hipp 2023-08-25 14:42:42 -04:00
parent 56d56b5018
commit 3dee9b21df

View File

@ -30,22 +30,11 @@ const dynamicBaseQuery: BaseQueryFn<
FetchBaseQueryError
> = async (args, api, extraOptions) => {
const baseUrl = $baseUrl.get();
console.log({ baseUrl })
if (baseUrl === undefined) {
return {
error: {
status: 400,
statusText: 'Bad Request',
data: 'No baseUrl set',
},
}
}
const authToken = $authToken.get();
const projectId = $projectId.get();
const rawBaseQuery = fetchBaseQuery({
baseUrl: `${baseUrl ?? ''}/api/v1`,
baseUrl: `http://localhost:1234/api/v1`,
prepareHeaders: (headers) => {
if (authToken) {
headers.set('Authorization', `Bearer ${authToken}`);