(values)
| 522 | } |
| 523 | |
| 524 | static async updateChannelGroup(values) { |
| 525 | try { |
| 526 | const { id, ...payload } = values; |
| 527 | const response = await request(`${host}/api/channels/groups/${id}/`, { |
| 528 | method: 'PUT', |
| 529 | body: payload, |
| 530 | }); |
| 531 | |
| 532 | if (response.id) { |
| 533 | useChannelsStore.getState().updateChannelGroup(response); |
| 534 | } |
| 535 | |
| 536 | return response; |
| 537 | } catch (e) { |
| 538 | errorNotification('Failed to update channel group', e); |
| 539 | } |
| 540 | } |
| 541 | |
| 542 | static async deleteChannelGroup(id) { |
| 543 | try { |
no test coverage detected