api client refactor

This commit is contained in:
2025-12-17 18:01:47 +01:00
parent bab55955e1
commit 4177644b18
190 changed files with 6403 additions and 1624 deletions

View File

@@ -0,0 +1,16 @@
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
}