Skip to content

Commit 02b622c

Browse files
committed
Allow for public teams to be shown in myteams calls.
1 parent 00595f3 commit 02b622c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: src/components/NewMatchForm.vue

+8-1
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,14 @@ export default {
419419
async created() {
420420
this.servers = await this.GetAllAvailableServers();
421421
if (this.IsAnyAdmin(this.user)) this.teams = await this.GetAllTeams();
422-
else this.teams = await this.GetMyTeams();
422+
else {
423+
let tmpPublicTeams = await this.GetAllTeams();
424+
this.teams = await this.GetMyTeams();
425+
tmpPublicTeams.forEach(async team => {
426+
if (typeof this.teams === "string") this.teams = [];
427+
if (team.public_team == 1) this.teams.push(team);
428+
});
429+
}
423430
this.seasons = await this.GetMyAvailableSeasons();
424431
if (typeof this.seasons == "string") this.seasons = [];
425432
this.MapList = await this.GetUserEnabledMapList(this.user.id);

0 commit comments

Comments
 (0)