(teamId)
| 746 | // test |
| 747 | // public API, make checks |
| 748 | public static async getTeamData(teamId) { |
| 749 | const teamLeader = await this.findOne({ 'teamsForTeamLeader.teamId': teamId }).setOptions({ |
| 750 | lean: true, |
| 751 | }); |
| 752 | |
| 753 | if (!teamLeader) { |
| 754 | return { error: 'no-team', teamName: '', teamLogoUrl: '' }; |
| 755 | } |
| 756 | |
| 757 | const team = teamLeader.teamsForTeamLeader.find((team) => { |
| 758 | return team.teamId === teamId; |
| 759 | }); |
| 760 | |
| 761 | return { teamName: team.teamName, teamLogoUrl: team.teamLogoUrl, error: '' }; |
| 762 | } |
| 763 | |
| 764 | // test |
| 765 | public static async getSubscriptionStatus(userId) { |
nothing calls this directly
no outgoing calls
no test coverage detected