()
| 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(); |
no test coverage detected