(values)
| 1208 | } |
| 1209 | |
| 1210 | static async updateStream(values) { |
| 1211 | try { |
| 1212 | const { id, ...payload } = values; |
| 1213 | const response = await request(`${host}/api/channels/streams/${id}/`, { |
| 1214 | method: 'PUT', |
| 1215 | body: payload, |
| 1216 | }); |
| 1217 | |
| 1218 | if (response.id) { |
| 1219 | useStreamsStore.getState().updateStream(response); |
| 1220 | } |
| 1221 | |
| 1222 | await API.requeryStreams(); |
| 1223 | return response; |
| 1224 | } catch (e) { |
| 1225 | errorNotification('Failed to update stream', e); |
| 1226 | } |
| 1227 | } |
| 1228 | |
| 1229 | static async deleteStream(id) { |
| 1230 | try { |
no test coverage detected