Skip to content

Commit

Permalink
Use Connection Channels
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Feb 6, 2024
1 parent 2caec32 commit 3f286a0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 3 additions & 1 deletion api/lib/data-mission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export default class DataMission {
if (!data.mission_sync) return;

if (!data.mission_groups.length) {
data.mission_groups = (await api.Group.list({})).data.map((group) =>{
data.mission_groups = (await api.Group.list({
useCache: 'true'
})).data.map((group) =>{
return group.name;
});
}
Expand Down
14 changes: 10 additions & 4 deletions api/web/src/components/util/GroupSelectModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,16 @@ export default {
},
fetch: async function() {
this.loading.groups = true;
const url = window.stdurl('/api/marti/group');
if (this.connection) url.searchParams.append('connection', this.connection);
this.list = await window.std(url);
this.loading.groups = false;
if (this.connection) {
const url = window.stdurl(`/api/connection/${this.connection}/channel`);
this.list = await window.std(url);
this.loading.groups = false;
} else {
const url = window.stdurl('/api/marti/group');
this.list = await window.std(url);
this.loading.groups = false;
}
},
close: function() {
this.$emit('close');
Expand Down

0 comments on commit 3f286a0

Please sign in to comment.