Compare commits

..

1 Commits

Author SHA1 Message Date
Millun Atluri
913ad69c34 fix typos 2023-12-20 17:02:54 +11:00
3 changed files with 10 additions and 10 deletions

View File

@@ -11,7 +11,7 @@ complex functionality.
InvokeAI Nodes can be found in the `invokeai/app/invocations` directory. These can be used as examples to create your own nodes.
New nodes should be added to a subfolder in `nodes` direction found at the root level of the InvokeAI installation location. Nodes added to this folder will be able to be used upon application startup.
New nodes should be added to a subfolder in the `nodes` directory found at the root level of the InvokeAI installation location. Nodes added to this folder will be imported upon application startup.
Example `nodes` subfolder structure:
```py

View File

@@ -34,7 +34,6 @@ import { actionSanitizer } from './middleware/devtools/actionSanitizer';
import { actionsDenylist } from './middleware/devtools/actionsDenylist';
import { stateSanitizer } from './middleware/devtools/stateSanitizer';
import { listenerMiddleware } from './middleware/listenerMiddleware';
import { authToastMiddleware } from 'services/api/authToastMiddleware';
const allReducers = {
canvas: canvasReducer,
@@ -97,7 +96,6 @@ export const createStore = (uniqueStoreKey?: string, persist = true) =>
})
.concat(api.middleware)
.concat(dynamicMiddlewares)
.concat(authToastMiddleware)
.prepend(listenerMiddleware.middleware),
enhancers: (getDefaultEnhancers) => {
const _enhancers = getDefaultEnhancers().concat(autoBatchEnhancer());

View File

@@ -5,10 +5,12 @@ import { t } from 'i18next';
import { z } from 'zod';
const zRejectedForbiddenAction = z.object({
payload: z.object({
status: z.literal(403),
data: z.object({
detail: z.string(),
action: z.object({
payload: z.object({
status: z.literal(403),
data: z.object({
detail: z.string(),
}),
}),
}),
});
@@ -20,8 +22,8 @@ export const authToastMiddleware: Middleware =
const parsed = zRejectedForbiddenAction.parse(action);
const { dispatch } = api;
const customMessage =
parsed.payload.data.detail !== 'Forbidden'
? parsed.payload.data.detail
parsed.action.payload.data.detail !== 'Forbidden'
? parsed.action.payload.data.detail
: undefined;
dispatch(
addToast({
@@ -30,7 +32,7 @@ export const authToastMiddleware: Middleware =
description: customMessage,
})
);
} catch (error) {
} catch {
// no-op
}
}