(values)
| 1190 | } |
| 1191 | |
| 1192 | static async addStream(values) { |
| 1193 | try { |
| 1194 | const response = await request(`${host}/api/channels/streams/`, { |
| 1195 | method: 'POST', |
| 1196 | body: values, |
| 1197 | }); |
| 1198 | |
| 1199 | if (response.id) { |
| 1200 | useStreamsStore.getState().addStream(response); |
| 1201 | } |
| 1202 | |
| 1203 | await API.requeryStreams(); |
| 1204 | return response; |
| 1205 | } catch (e) { |
| 1206 | errorNotification('Failed to add stream', e); |
| 1207 | } |
| 1208 | } |
| 1209 | |
| 1210 | static async updateStream(values) { |
| 1211 | try { |
no test coverage detected