mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
add logging
This commit is contained in:
parent
bc585ba964
commit
56d56b5018
@ -39,6 +39,7 @@ const InvokeAIUI = ({
|
||||
}: Props) => {
|
||||
const [isReady, setIsReady] = useState(false);
|
||||
useEffect(() => {
|
||||
console.log({ apiUrl });
|
||||
if (token && apiUrl && projectId) {
|
||||
$authToken.set(token);
|
||||
$baseUrl.set(apiUrl);
|
||||
@ -49,6 +50,7 @@ const InvokeAIUI = ({
|
||||
$baseUrl.set(apiUrl);
|
||||
setIsReady(true);
|
||||
} else {
|
||||
$baseUrl.set('');
|
||||
setIsReady(true);
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ import {
|
||||
fetchBaseQuery,
|
||||
} from '@reduxjs/toolkit/query/react';
|
||||
import { $authToken, $baseUrl, $projectId } from 'services/api/client';
|
||||
import { undefined } from 'zod';
|
||||
|
||||
export const tagTypes = [
|
||||
'Board',
|
||||
@ -29,6 +30,17 @@ 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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user