MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / fetchTagModels

Function fetchTagModels

web/src/pages/Channel/EditTagModal.js:201–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

199
200 useEffect(() => {
201 const fetchTagModels = async () => {
202 if (!tag) return;
203 setLoading(true);
204 try {
205 const res = await API.get(`/api/channel/tag/models?tag=${tag}`);
206 if (res?.data?.success) {
207 const models = res.data.data ? res.data.data.split(',') : [];
208 handleInputChange('models', models);
209 } else {
210 showError(res.data.message);
211 }
212 } catch (error) {
213 showError(error.message);
214 } finally {
215 setLoading(false);
216 }
217 };
218
219 fetchModels().then();
220 fetchGroups().then();

Callers 1

EditTagModal.jsFile · 0.85

Calls 2

showErrorFunction · 0.90
handleInputChangeFunction · 0.70

Tested by

no test coverage detected