MCPcopy Index your code
hub / github.com/Dispatcharr/Dispatcharr / addChannelGroup

Method addChannelGroup

frontend/src/api.js:497–522  ·  view source on GitHub ↗
(values)

Source from the content-addressed store, hash-verified

495 }
496
497 static async addChannelGroup(values) {
498 try {
499 const response = await request(`${host}/api/channels/groups/`, {
500 method: 'POST',
501 body: values,
502 });
503
504 if (response.id) {
505 // Add association flags for new groups
506 const processedGroup = {
507 ...response,
508 hasChannels: false,
509 hasM3UAccounts: false,
510 canEdit: true,
511 canDelete: true,
512 };
513 useChannelsStore.getState().addChannelGroup(processedGroup);
514 // Refresh channel groups to update the UI
515 useChannelsStore.getState().fetchChannelGroups();
516 }
517
518 return response;
519 } catch (e) {
520 errorNotification('Failed to create channel group', e);
521 }
522 }
523
524 static async updateChannelGroup(values) {
525 try {

Callers 2

addChannelGroupFunction · 0.80
channels.test.jsxFile · 0.80

Calls 2

requestFunction · 0.85
errorNotificationFunction · 0.85

Tested by

no test coverage detected