Skip to content

Commit

Permalink
Auto Subscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Oct 10, 2024
1 parent 3c9cf73 commit 490c045
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions api/lib/data-mission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ export default class DataMission {
mission_token: mission.token || undefined
});

const conn = config.conns.get(data.connection);
if (conn) {
await api.Mission.subscribe(data.name, {
uid: conn.config.uid()
},{
token: mission.token || undefined
});
}

// The groups property isn't returned by Create
// Make this second call to get the groups - TODO Talk to Josh
mission = await api.Mission.get(data.name, {}, {
Expand Down
4 changes: 2 additions & 2 deletions api/web/src/components/DataEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ export default {
auto_transform: true,
mission_sync: true,
mission_groups: [],
mission_role: 'MISSION_SUBSCRIBER',
mission_diff: false,
mission_role: 'MISSION_READONLY_SUBSCRIBER',
mission_diff: true,
description: '',
}
}
Expand Down

0 comments on commit 490c045

Please sign in to comment.