fix: Add API tags for Scanned Models

This commit is contained in:
blessedcoolant 2023-07-18 11:57:45 +12:00
parent fca6a5dd3c
commit 337399ff7c

View File

@ -385,6 +385,21 @@ export const modelsApi = api.injectEndpoints({
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>({
query: () => {