MCPcopy Create free account
hub / github.com/async-labs/async / getTeamData

Method getTeamData

api/server/models/User.ts:748–762  ·  view source on GitHub ↗
(teamId)

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected