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) => {
|
}: Props) => {
|
||||||
const [isReady, setIsReady] = useState(false);
|
const [isReady, setIsReady] = useState(false);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
console.log({ apiUrl });
|
||||||
if (token && apiUrl && projectId) {
|
if (token && apiUrl && projectId) {
|
||||||
$authToken.set(token);
|
$authToken.set(token);
|
||||||
$baseUrl.set(apiUrl);
|
$baseUrl.set(apiUrl);
|
||||||
@ -49,6 +50,7 @@ const InvokeAIUI = ({
|
|||||||
$baseUrl.set(apiUrl);
|
$baseUrl.set(apiUrl);
|
||||||
setIsReady(true);
|
setIsReady(true);
|
||||||
} else {
|
} else {
|
||||||
|
$baseUrl.set('');
|
||||||
setIsReady(true);
|
setIsReady(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ import {
|
|||||||
fetchBaseQuery,
|
fetchBaseQuery,
|
||||||
} from '@reduxjs/toolkit/query/react';
|
} from '@reduxjs/toolkit/query/react';
|
||||||
import { $authToken, $baseUrl, $projectId } from 'services/api/client';
|
import { $authToken, $baseUrl, $projectId } from 'services/api/client';
|
||||||
|
import { undefined } from 'zod';
|
||||||
|
|
||||||
export const tagTypes = [
|
export const tagTypes = [
|
||||||
'Board',
|
'Board',
|
||||||
@ -29,6 +30,17 @@ const dynamicBaseQuery: BaseQueryFn<
|
|||||||
FetchBaseQueryError
|
FetchBaseQueryError
|
||||||
> = async (args, api, extraOptions) => {
|
> = async (args, api, extraOptions) => {
|
||||||
const baseUrl = $baseUrl.get();
|
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 authToken = $authToken.get();
|
||||||
const projectId = $projectId.get();
|
const projectId = $projectId.get();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user