mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix: Add API tags for Scanned Models
This commit is contained in:
parent
fca6a5dd3c
commit
337399ff7c
@ -385,6 +385,21 @@ export const modelsApi = api.injectEndpoints({
|
|||||||
url: `/models/search?${folderQueryStr}`,
|
url: `/models/search?${folderQueryStr}`,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
providesTags: (result, error, arg) => {
|
||||||
|
const tags: ApiFullTagDescription[] = [
|
||||||
|
{ type: 'ScannedModels', id: LIST_TAG },
|
||||||
|
];
|
||||||
|
|
||||||
|
if (result) {
|
||||||
|
tags.push(
|
||||||
|
...result.map((id) => ({
|
||||||
|
type: 'ScannedModels' as const,
|
||||||
|
id,
|
||||||
|
}))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return tags;
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
getCheckpointConfigs: build.query<CheckpointConfigsResponse, void>({
|
getCheckpointConfigs: build.query<CheckpointConfigsResponse, void>({
|
||||||
query: () => {
|
query: () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user