mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
fix tsc errors
This commit is contained in:
committed by
psychedelicious
parent
a7ea096b28
commit
8fce168dc5
@@ -1,4 +1,5 @@
|
||||
import { getStore } from 'app/store/nanostores/store';
|
||||
import { selectListBoardsQueryArgs } from 'features/gallery/store/gallerySelectors';
|
||||
import { boardsApi } from 'services/api/endpoints/boards';
|
||||
import { imagesApi } from 'services/api/endpoints/images';
|
||||
import { modelsApi } from 'services/api/endpoints/models';
|
||||
@@ -43,9 +44,10 @@ export const checkImageAccess = async (name: string): Promise<boolean> => {
|
||||
* @returns A promise that resolves to true if the client has access, else false.
|
||||
*/
|
||||
export const checkBoardAccess = async (id: string): Promise<boolean> => {
|
||||
const { dispatch } = getStore();
|
||||
const { dispatch, getState } = getStore();
|
||||
try {
|
||||
const req = dispatch(boardsApi.endpoints.listAllBoards.initiate());
|
||||
const queryArgs = selectListBoardsQueryArgs(getState());
|
||||
const req = dispatch(boardsApi.endpoints.listAllBoards.initiate(queryArgs));
|
||||
req.unsubscribe();
|
||||
const result = await req.unwrap();
|
||||
return result.some((b) => b.board_id === id);
|
||||
|
||||
Reference in New Issue
Block a user