mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-16 19:05:03 -05:00
- available infill methods is server state - remove it from client state, use the query to populate the dropdown - add listener to ensure the selected infill method is an available one
24 lines
607 B
TypeScript
24 lines
607 B
TypeScript
import { api } from '..';
|
|
import { AppConfig, AppVersion } from '../types';
|
|
|
|
export const appInfoApi = api.injectEndpoints({
|
|
endpoints: (build) => ({
|
|
getAppVersion: build.query<AppVersion, void>({
|
|
query: () => ({
|
|
url: `app/version`,
|
|
method: 'GET',
|
|
}),
|
|
keepUnusedDataFor: 86400000, // 1 day
|
|
}),
|
|
getAppConfig: build.query<AppConfig, void>({
|
|
query: () => ({
|
|
url: `app/config`,
|
|
method: 'GET',
|
|
}),
|
|
keepUnusedDataFor: 86400000, // 1 day
|
|
}),
|
|
}),
|
|
});
|
|
|
|
export const { useGetAppVersionQuery, useGetAppConfigQuery } = appInfoApi;
|