16 lines
698 B
TypeScript
16 lines
698 B
TypeScript
import { api as api } from '../../api';
|
|
import { presentTeamJoinRequest } from '../../presenters';
|
|
import { TeamJoinRequestViewModel } from '../../view-models';
|
|
|
|
export async function getTeamJoinRequests(teamId: string, currentUserId: string, isOwner: boolean): Promise<TeamJoinRequestViewModel[]> {
|
|
const dto = await api.teams.getJoinRequests(teamId);
|
|
return dto.requests.map(r => presentTeamJoinRequest(r, currentUserId, isOwner));
|
|
}
|
|
|
|
export async function approveTeamJoinRequest(teamId: string, requestId: string): Promise<void> {
|
|
// TODO: implement API call
|
|
}
|
|
|
|
export async function rejectTeamJoinRequest(teamId: string, requestId: string): Promise<void> {
|
|
// TODO: implement API call
|
|
} |