()
| 225 | |
| 226 | let channelModels = undefined; |
| 227 | export async function loadChannelModels() { |
| 228 | const res = await API.get('/api/models'); |
| 229 | const { success, data } = res.data; |
| 230 | if (!success) { |
| 231 | return; |
| 232 | } |
| 233 | channelModels = data; |
| 234 | localStorage.setItem('channel_models', JSON.stringify(data)); |
| 235 | } |
| 236 | |
| 237 | export function getChannelModels(type) { |
| 238 | if (channelModels !== undefined && type in channelModels) { |