feat: introducing get team info by id in admin module as a query (HBE-182) (#54)
* feat: introducing get team info by id in admin module as a query * chore: adding resolve field for admin * chore: remove nullable false * refactor: rename getTeamInfo to teamInfo * refactor: make myRole nullable
This commit is contained in:
@@ -393,4 +393,15 @@ export class AdminService {
|
||||
const teamRequestCount = this.teamRequestService.getTeamRequestsCount();
|
||||
return teamRequestCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get team info by ID
|
||||
* @param teamID Team ID
|
||||
* @returns an Either of `Team` or error
|
||||
*/
|
||||
async getTeamInfo(teamID: string) {
|
||||
const team = await this.teamService.getTeamWithIDTE(teamID)();
|
||||
if (E.isLeft(team)) return E.left(team.left);
|
||||
return E.right(team.right);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user